Diagnostic tests: create fieldRename subDir and use it for related tests

Related to: KT-55846, KT-50082, KT-55436, KT-55017
This commit is contained in:
Mikhail Glukhikh
2023-01-10 13:34:37 +01:00
committed by Space Team
parent 35c0a3d391
commit f6bd4d5e15
18 changed files with 160 additions and 120 deletions
@@ -0,0 +1,48 @@
// 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
}