[IR][tests] Add tests for removal-of-overridden open callable case
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
open class C {
|
||||
open fun foo(): String = "FAIL1"
|
||||
}
|
||||
|
||||
interface I {
|
||||
fun foo(): String = "FAIL2"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
open class C
|
||||
interface I
|
||||
@@ -0,0 +1,6 @@
|
||||
STEP 0:
|
||||
dependencies: stdlib
|
||||
STEP 1:
|
||||
dependencies: stdlib
|
||||
modifications:
|
||||
U : l1.kt.1 -> l1.kt
|
||||
@@ -0,0 +1,7 @@
|
||||
class C2 : C() {
|
||||
override fun foo(): String = "O" // does not call super
|
||||
}
|
||||
|
||||
class I2 : I {
|
||||
override fun foo(): String = "K" // does not call super
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
STEP 0:
|
||||
dependencies: stdlib, lib1
|
||||
@@ -0,0 +1,3 @@
|
||||
fun box(): String {
|
||||
return C2().foo() + I2().foo()
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
STEP 0:
|
||||
dependencies: stdlib, lib1, lib2
|
||||
@@ -0,0 +1,7 @@
|
||||
MODULES: lib1, lib2, main
|
||||
|
||||
STEP 0:
|
||||
libs: lib1, lib2, main
|
||||
|
||||
STEP 1:
|
||||
libs: lib1
|
||||
@@ -0,0 +1,7 @@
|
||||
open class C {
|
||||
open val foo: String get() = "FAIL1"
|
||||
}
|
||||
|
||||
interface I {
|
||||
val foo: String get() = "FAIL2"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
open class C
|
||||
interface I
|
||||
@@ -0,0 +1,6 @@
|
||||
STEP 0:
|
||||
dependencies: stdlib
|
||||
STEP 1:
|
||||
dependencies: stdlib
|
||||
modifications:
|
||||
U : l1.kt.1 -> l1.kt
|
||||
@@ -0,0 +1,7 @@
|
||||
class C2 : C() {
|
||||
override val foo: String get() = "O" // does not call super
|
||||
}
|
||||
|
||||
class I2 : I {
|
||||
override val foo: String get() = "K" // does not call super
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
STEP 0:
|
||||
dependencies: stdlib, lib1
|
||||
@@ -0,0 +1,3 @@
|
||||
fun box(): String {
|
||||
return C2().foo + I2().foo
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
STEP 0:
|
||||
dependencies: stdlib, lib1, lib2
|
||||
@@ -0,0 +1,7 @@
|
||||
MODULES: lib1, lib2, main
|
||||
|
||||
STEP 0:
|
||||
libs: lib1, lib2, main
|
||||
|
||||
STEP 1:
|
||||
libs: lib1
|
||||
+10
@@ -75,6 +75,16 @@ public class JsKLibABITestCaseGenerated extends AbstractJsKLibABITestCase {
|
||||
runTest("compiler/testData/klibABI/removeFunction/");
|
||||
}
|
||||
|
||||
@TestMetadata("removeOpenFunction")
|
||||
public void testRemoveOpenFunction() throws Exception {
|
||||
runTest("compiler/testData/klibABI/removeOpenFunction/");
|
||||
}
|
||||
|
||||
@TestMetadata("removeOpenProperty")
|
||||
public void testRemoveOpenProperty() throws Exception {
|
||||
runTest("compiler/testData/klibABI/removeOpenProperty/");
|
||||
}
|
||||
|
||||
@TestMetadata("removeProperty")
|
||||
public void testRemoveProperty() throws Exception {
|
||||
runTest("compiler/testData/klibABI/removeProperty/");
|
||||
|
||||
Generated
+12
@@ -78,6 +78,18 @@ public class KlibABITestGenerated extends AbstractNativeKlibABITest {
|
||||
runTest("compiler/testData/klibABI/removeFunction/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("removeOpenFunction")
|
||||
public void testRemoveOpenFunction() throws Exception {
|
||||
runTest("compiler/testData/klibABI/removeOpenFunction/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("removeOpenProperty")
|
||||
public void testRemoveOpenProperty() throws Exception {
|
||||
runTest("compiler/testData/klibABI/removeOpenProperty/");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("removeProperty")
|
||||
public void testRemoveProperty() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user