JS: fix non-abstract extension properties in interfaces
KT-20994
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
interface I {
|
||||
val String.foo: String
|
||||
get() = this + ";" + bar()
|
||||
|
||||
fun bar(): String
|
||||
}
|
||||
|
||||
class C : I {
|
||||
override fun bar() = "C.bar"
|
||||
|
||||
fun test() = "test".foo
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val r = C().test()
|
||||
if (r != "test;C.bar") return "fail: $r"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -8591,6 +8591,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonAbstractInInterface.kt")
|
||||
public void testNonAbstractInInterface() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt");
|
||||
|
||||
@@ -8591,6 +8591,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonAbstractInInterface.kt")
|
||||
public void testNonAbstractInInterface() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt");
|
||||
|
||||
@@ -8591,6 +8591,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonAbstractInInterface.kt")
|
||||
public void testNonAbstractInInterface() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("topLevel.kt")
|
||||
public void testTopLevel() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt");
|
||||
|
||||
Reference in New Issue
Block a user