Fix mapping of nullable generic underlying types of inline classes

#KT-32162 Fixed
This commit is contained in:
Ilmir Usmanov
2022-02-22 00:15:32 +01:00
committed by teamcity
parent 981f8b1871
commit 8811f62300
77 changed files with 3400 additions and 131 deletions
@@ -19,6 +19,16 @@ value class MultipleInitBlocks<T>(val a: T) {
}
}
OPTIONAL_JVM_INLINE_ANNOTATION
value class MultipleInitBlocks2<T: Any>(val a: T?) {
init {
res = "O"
}
init {
res += "K"
}
}
OPTIONAL_JVM_INLINE_ANNOTATION
value class Lambda<T: String>(val s: T) {
init {
@@ -137,6 +147,10 @@ fun box(): String {
MultipleInitBlocks(null)
if (res != "OK") return "FAIL 21: $res"
res = "FAIL 22"
MultipleInitBlocks2(null)
if (res != "OK") return "FAIL 221: $res"
res = "FAIL 3"
Lambda("OK")
if (res != "OK") return "FAIL 31: $res"