[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
-34
View File
@@ -59,37 +59,3 @@ class TestInitVarWithCustomSetter {
}
class TestInitVarWithCustomSetterWithExplicitCtor {
var x: Int
get
set(value: Int) {
<this>.#x = value
}
init {
<this>.<set-x>(value = 0)
}
constructor() {
super/*Any*/()
/* <init>() */
}
}
class TestInitVarWithCustomSetterInCtor {
var x: Int
get
set(value: Int) {
<this>.#x = value
}
constructor() {
super/*Any*/()
/* <init>() */
<this>.<set-x>(value = 42)
}
}