K2: reproduce KT-54917

This commit is contained in:
Mikhail Glukhikh
2023-06-12 15:15:42 +02:00
committed by Space Team
parent 1c89a7e400
commit 7884d9a61e
8 changed files with 56 additions and 0 deletions
@@ -0,0 +1,9 @@
// WITH_STDLIB
// FIR_DUMP
fun foo() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<IOT>")!>foo(1 to 2)<!>
val x = foo(3 to 4)
}
fun <T : Comparable<T>> foo(vararg values: Pair<T, T>): List<T> = TODO()
@@ -0,0 +1,8 @@
FILE: literalInCompletedGeneric.fir.kt
public final fun foo(): R|kotlin/Unit| {
R|/foo|<R|kotlin/Int|>(vararg(Int(1).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(2))))
lval x: R|kotlin/collections/List<IOT>| = R|/foo|<R|kotlin/Int|>(vararg(Int(3).R|kotlin/to|<R|kotlin/Int|, R|kotlin/Int|>(Int(4))))
}
public final fun <T : R|kotlin/Comparable<T>|> foo(vararg values: R|kotlin/Array<out kotlin/Pair<T, T>>|): R|kotlin/collections/List<T>| {
^foo R|kotlin/TODO|()
}
@@ -0,0 +1,9 @@
// WITH_STDLIB
// FIR_DUMP
fun foo() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<kotlin.Int>")!>foo(1 to 2)<!>
val x = foo(3 to 4)
}
fun <T : Comparable<T>> foo(vararg values: Pair<T, T>): List<T> = TODO()