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
33 lines
549 B
Kotlin
Vendored
33 lines
549 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 != null) return "fail 1"
|
|
|
|
javaClass.isValue = false
|
|
if (javaClass.isValue != false) return "fail 2"
|
|
|
|
javaClass.isValue = true
|
|
if (javaClass.isValue != true) return "fail 3"
|
|
|
|
return "OK"
|
|
}
|