[FIR] Reproduce KT-64644

Ensure the given code crashes the
compiler.

^KT-64644
This commit is contained in:
Nikolay Lunyak
2024-01-03 13:55:41 +02:00
committed by Space Team
parent aaf34c3436
commit 7c3042772e
7 changed files with 52 additions and 0 deletions
@@ -0,0 +1,11 @@
// ISSUE: KT-64644
// WITH_STDLIB
typealias MaybePair = Pair<Int, Int>?
fun <T: <!FINAL_UPPER_BOUND!>MaybePair<!>> foo(x: T) {
if (x != null) {
println(x<!UNSAFE_CALL!>.<!>first)
println(x<!UNSAFE_CALL!>.<!>second)
}
}
@@ -0,0 +1,11 @@
// ISSUE: KT-64644
// WITH_STDLIB
typealias MaybePair = Pair<Int, Int>?
fun <T: MaybePair> foo(x: T) {
if (x != null) {
println(<!DEBUG_INFO_SMARTCAST!>x<!>.first)
println(<!DEBUG_INFO_SMARTCAST!>x<!>.second)
}
}