[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:
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user