Files
kotlin-fork/compiler/testData/ir/irText/classes/initVar.kt
T
Nikita Bobko d9d4dee582 [FIR] fix false negative MUST_BE_INITIALIZED for deferred init + custom setter case
^KT-58346 Fixed
Review: https://jetbrains.team/p/kt/reviews/9967

BTW this commit accidentaly and partially fixes KT-57553 for K2, because
of a cleaner K2 architecture. I will unify MUST_BE_INITIALIZED behaviour
in K1 and K2 in the next commits
2023-05-23 14:12:28 +03:00

19 lines
274 B
Kotlin
Vendored

// FIR_IDENTICAL
class TestInitVarFromParameter(var x: Int)
class TestInitVarInClass {
var x = 0
}
class TestInitVarInInitBlock {
var x: Int
init {
x = 0
}
}
class TestInitVarWithCustomSetter {
var x = 0
set(value) { field = value }
}