Files
kotlin-fork/compiler/testData/diagnostics/tests/backingField/ExtensionProperty.fir.kt
T

18 lines
382 B
Kotlin
Vendored

// See KT-9303: synthetic field variable does not exist for extension properties
val String.foo: Int
get() {
// No shadowing here
val field = 42
return field
}
val String.bar: Int = 13
// Error
get() = <!UNRESOLVED_REFERENCE!>field<!>
class My {
val String.x: Int = 7
// Error
get() = <!UNRESOLVED_REFERENCE!>field<!>
}