Update "defaultness" for property accessor with inherited visibility
Property accessor that overrides a non-default property accessor with visibility different from the property visibility was incorrectly considered "default". Corresponding metadata was written incorrectly, and 'internal' setter call caused NSME #KT-23044 Fixed Target versions 1.2.40
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// FILE: A.kt
|
||||
abstract class Base {
|
||||
abstract var x: String
|
||||
internal set
|
||||
}
|
||||
|
||||
class Derived: Base() {
|
||||
override var x: String = "Z"
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
fun box(): String {
|
||||
val d = Derived()
|
||||
d.x = "OK"
|
||||
return d.x
|
||||
}
|
||||
+6
@@ -133,6 +133,12 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("internalSetterOverridden.kt")
|
||||
public void testInternalSetterOverridden() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jvmField.kt")
|
||||
public void testJvmField() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt");
|
||||
|
||||
Reference in New Issue
Block a user