Improve support of 'lateinit' modifier

- Allow 'lateinit' for inline classes which underlying type
is suitable for 'lateinit'

- K2: report all problems related to 'lateinit' modifier

^KT-55052: Fixed
This commit is contained in:
Vladislav Grechko
2022-11-18 03:22:17 +01:00
committed by teamcity
parent e0c13e5276
commit cd6e865fb3
35 changed files with 406 additions and 84 deletions
@@ -1,17 +0,0 @@
// !SKIP_JAVAC
// !LANGUAGE: +InlineClasses
// ALLOW_KOTLIN_PACKAGE
// !DIAGNOSTICS: -UNUSED_VARIABLE
package kotlin.jvm
annotation class JvmInline
@JvmInline
value class Foo(val x: Int)
lateinit var a: Foo
fun foo() {
lateinit var b: Foo
}
@@ -2,6 +2,7 @@
// !LANGUAGE: +InlineClasses
// ALLOW_KOTLIN_PACKAGE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FIR_IDENTICAL
package kotlin.jvm