[JS IR] Add test on exportable overriden method
^KT-44415 fixed
This commit is contained in:
Generated
+5
@@ -1622,6 +1622,11 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overridenMethod.kt")
|
||||
public void testOverridenMethod() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overridenMethod.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reservedModuleName.kt")
|
||||
public void testReservedModuleName() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleName.kt");
|
||||
|
||||
+5
@@ -1622,6 +1622,11 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overridenMethod.kt")
|
||||
public void testOverridenMethod() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overridenMethod.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reservedModuleName.kt")
|
||||
public void testReservedModuleName() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleName.kt");
|
||||
|
||||
+5
@@ -1627,6 +1627,11 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overridenMethod.kt")
|
||||
public void testOverridenMethod() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overridenMethod.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reservedModuleName.kt")
|
||||
public void testReservedModuleName() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleName.kt");
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
abstract class Foo1 {
|
||||
abstract fun ok(): String
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class Bar1 : Foo1() {
|
||||
override fun ok(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
open class Foo2 {
|
||||
open fun ok(): String {
|
||||
return "fail"
|
||||
}
|
||||
}
|
||||
|
||||
@JsExport
|
||||
class Bar2 : Foo2() {
|
||||
override fun ok(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return if (Bar1().ok() == "OK" && Bar2().ok() == "OK") "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user