e0baeb53db
When building the original for a substitution override for a synthetic property, use the initial setter as fallback when unsubstituting it returns null. This can happen when a generic class overrides the getter of a synthetic property of a non-generic class. Then the setter is never substituted, therefore there is nothing to unsubstitute. ^KT-57168 Fixed
20 lines
451 B
Kotlin
Vendored
20 lines
451 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// FILE: Component.java
|
|
|
|
public abstract class Component {
|
|
public void setPreferredSize(Object preferredSize) {}
|
|
public Object getPreferredSize() { return new Object(); }
|
|
}
|
|
|
|
// FILE: ProjectMain.kt
|
|
|
|
class ComboBox<T>: Component() {
|
|
override fun getPreferredSize(): Any? = "OK"
|
|
}
|
|
|
|
fun box(): String {
|
|
val comboBox = ComboBox<Int>()
|
|
comboBox.preferredSize = Any()
|
|
return comboBox.preferredSize as String
|
|
}
|