Commit Graph

3 Commits

Author SHA1 Message Date
Ilya Chernikov 90a7f7beac K2 Scripting: fix CFG processing related testdata in compiler 2023-12-12 09:58:19 +00:00
Marco Pennekamp 730f98ba38 [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
2023-11-09 13:09:39 +00:00
Marco Pennekamp 1cc2390af6 [FIR] Add tests for top-level property initialization in scripts
- The test data is missing initialization checks and will be fixed with
  the subsequent commit.
- The test data is originally taken from
  `backingField/TopLevelPropertyInitialization` and has been simplified.
- I didn't add `const val` properties to the test data (compared to the
  original) due to KT-20110.

^KT-63286
2023-11-09 13:09:39 +00:00