Files
kotlin-fork/compiler/testData/diagnostics/tests/fieldRename/derivedClassPropertyShadowsBaseClassField.fir.kt
T
Mikhail Glukhikh f6bd4d5e15 Diagnostic tests: create fieldRename subDir and use it for related tests
Related to: KT-55846, KT-50082, KT-55436, KT-55017
2023-01-30 14:55:40 +00:00

49 lines
762 B
Kotlin
Vendored

// WITH_STDLIB
// FILE: Base.java
public class Base {
public String regular = "a";
public String withGetter = "b";
public String lateInit = "c";
public String lazyProp = "d";
public String withSetter = "e";
public String openProp = "f";
}
// FILE: test.kt
open class Derived : Base() {
val regular = "aa"
val withGetter get() = "bb"
lateinit var lateInit: String
val lazyProp by lazy { "dd" }
var withSetter: String = "ee"
set(value) {
println(value)
field = value
}
open val openProp = "ff"
}
fun test(d: Derived) {
d.regular
d.withGetter
d.lateInit
d.lazyProp
d.withSetter = ""
d.openProp
d::withGetter
Derived::withGetter
}