[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
This commit is contained in:
Nikita Bobko
2023-05-15 11:59:40 +02:00
parent 151144bbed
commit d9d4dee582
17 changed files with 87 additions and 450 deletions
-21
View File
@@ -16,24 +16,3 @@ class TestInitVarWithCustomSetter {
var x = 0
set(value) { field = value }
}
class TestInitVarWithCustomSetterWithExplicitCtor {
var x: Int
set(value) { field = value }
init {
x = 0
}
constructor()
}
class TestInitVarWithCustomSetterInCtor {
var x: Int set(value) {
field = value
}
constructor() {
x = 42
}
}