3345dc81fd
Otherwise this code behaves incorrectly on getter-only properties: it returns a meaningless field signature whereas the property has no field. It's hard to come up with an example of when this could matter in compiler code, but it's very noticeable in kotlinx-metadata-jvm #KT-26188 Fixed
13 lines
333 B
Kotlin
Vendored
13 lines
333 B
Kotlin
Vendored
class C(val constructorParam: String = "") {
|
|
val getterOnlyVal: Double get() = 0.0
|
|
var accessorOnlyVar: Int
|
|
get() = 1
|
|
set(value) {}
|
|
|
|
var withBackingField: String = "42"
|
|
|
|
val <T : Number> T.delegated: List<Nothing> by null
|
|
|
|
operator fun Nothing?.getValue(x: Any?, y: Any?) = emptyList<Nothing>()
|
|
}
|