Commit Graph

4 Commits

Author SHA1 Message Date
Nikita Bobko 088c25ea41 [Test] Refactor DeferredInit testData to make it more readable
Review: https://jetbrains.team/p/kt/reviews/9967

1. Fix weird indentation in ValDeferredInit*
2. Use meaningful names in ValDeferredInit*
3. Drop leading indentation in VarDeferredInit*. Not everyone has a wide
   monitor
4. Add some NOTICABLE comment that VarDeferredInit* test should be read
   as table
2023-05-23 14:12:29 +03:00
Nikita Bobko 26e45304e1 [Test] backingField testData: migrate from deprecated directive syntax
Review: https://jetbrains.team/p/kt/reviews/9967
2023-05-23 14:12:29 +03:00
Nikita Bobko ac40010501 [FE] Prohibit open val deferred initialization
^KT-57553 Fixed
Review: https://jetbrains.team/p/kt/reviews/9967

Other related tests:
- testUninitializedOrReassignedVariables
- testUseOfPropertiesWithoutPrimary
- @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors")
- testAugmentedAssignmentInInitializer
- testInitOpenSetter
- testInitOverrideInConstructorComplex
- testPropertyInitializationOrder
2023-05-23 14:12:28 +03:00
Nikita Bobko 151144bbed [Test] Cover properties deferred initialization with more tests
Review: https://jetbrains.team/p/kt/reviews/9967

I'm going to change the logic in this area in the next few commits
KT-57553. So let's cover the current behaviour with tests.

*.fir.kt tests are not properly formatted because of K1 and K2 different
behaviour. I will fix it in the next commits
2023-05-23 14:12:28 +03:00