More correct detection of super property
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import kotlinApi.KotlinClassWithProperties;
|
||||
import javaApi.JavaClassWithProperties;
|
||||
import javaApi.JavaClassDerivedFromKotlinClassWithProperties;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -100,4 +101,13 @@ class C extends A {
|
||||
public String getSomeVar1() {
|
||||
return super.getSomeVar1();
|
||||
}
|
||||
}
|
||||
|
||||
class D extends JavaClassDerivedFromKotlinClassWithProperties {
|
||||
@Override
|
||||
public String getSomeVar1() { return "a"; }
|
||||
|
||||
@Override
|
||||
public void setSomeVar2(String value) { }
|
||||
|
||||
}
|
||||
@@ -2,8 +2,11 @@
|
||||
// ERROR: Property must be initialized
|
||||
// ERROR: Property must be initialized
|
||||
// ERROR: Property must be initialized
|
||||
// ERROR: Property must be initialized
|
||||
// ERROR: Property must be initialized
|
||||
import kotlinApi.KotlinClassWithProperties
|
||||
import javaApi.JavaClassWithProperties
|
||||
import javaApi.JavaClassDerivedFromKotlinClassWithProperties
|
||||
|
||||
internal open class A : KotlinClassWithProperties() {
|
||||
override var someVar1: String
|
||||
@@ -82,4 +85,16 @@ internal class C : A() {
|
||||
get() {
|
||||
return super.someVar1
|
||||
}
|
||||
}
|
||||
|
||||
internal class D : JavaClassDerivedFromKotlinClassWithProperties() {
|
||||
override var someVar1: String
|
||||
get() {
|
||||
return "a"
|
||||
}
|
||||
|
||||
override var someVar2: String
|
||||
set(value: String) {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user