574aa0affe
Synthetic property is var when it have setter. The latter is set up in property when its parameter type is equal to getter return type. In case of using @Nullable, parameter type of setter is not equal to return type of getter, because the latter is flexible type. So to fix this verification should occur using not null types #KT-39076 Fixed
31 lines
468 B
Kotlin
Vendored
31 lines
468 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// FILE: JavaClass.java
|
|
|
|
public class JavaClass {
|
|
|
|
private boolean value;
|
|
|
|
public boolean isValue() {
|
|
return value;
|
|
}
|
|
|
|
public void setValue(Boolean value) {
|
|
this.value = value;
|
|
}
|
|
}
|
|
|
|
// FILE: kotlin.kt
|
|
|
|
fun box(): String {
|
|
val javaClass = JavaClass()
|
|
|
|
if (javaClass.isValue != false) return "fail 1"
|
|
|
|
javaClass.isValue = true
|
|
|
|
if (javaClass.isValue != true) return "fail 2"
|
|
|
|
return "OK"
|
|
}
|