[FIR] Fix top-level property initialization checks in scripts

- While `collectionInitializationInfo` unwrapped a script's top-level
  declarations, `check` forgot to do it, so a script effectively had no
  top-level properties in the mind of the checker.

^KT-63286 fixed
This commit is contained in:
Marco Pennekamp
2023-11-07 22:51:13 +01:00
committed by Space Team
parent 1cc2390af6
commit 730f98ba38
3 changed files with 23 additions and 20 deletions
@@ -32,9 +32,9 @@ val d: String by simpleDelegate(d)
val e: String by inPlaceDelegate { e }
val f: String by notInPlaceDelegate { f }
val g: Int
<!MUST_BE_INITIALIZED!>val g: Int<!>
val h = 1.also { <!VAL_REASSIGNMENT!>g<!> = 2 }
val i: Int
<!MUST_BE_INITIALIZED!>val i: Int<!>
val j by lazy { <!VAL_REASSIGNMENT!>i<!> = 2; 1 }
val k: Int
get() {