Files
kotlin-fork/libraries/tools/kotlinp/testData/Properties.kt
T
Alexander Udalov 3345dc81fd Do not return field signature if there's none in the metadata
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
2018-08-16 15:05:19 +02:00

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>()
}