Put using underscored type arguments under a feature

This commit is contained in:
Victor Petukhov
2021-10-22 11:56:58 +03:00
parent 1073adbbf0
commit 5508d40371
14 changed files with 50 additions and 1 deletions
@@ -1,3 +1,4 @@
// !LANGUAGE: +PartiallySpecifiedTypeArguments
// !DIAGNOSTICS: -UNCHECKED_CAST
// FIR_IDENTICAL
// WITH_RUNTIME
@@ -0,0 +1,10 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNCHECKED_CAST
// WITH_RUNTIME
fun <K, T> foo(x: (K) -> T): Pair<K, T> = (1 as K) to (1f as T)
fun box(): String {
val x = foo<Int, <!UNRESOLVED_REFERENCE!>_<!>> { it.toFloat() } // Pair<Int, Float>
return "OK"
}
@@ -0,0 +1,4 @@
package
public fun box(): kotlin.String
public fun </*0*/ K, /*1*/ T> foo(/*0*/ x: (K) -> T): kotlin.Pair<K, T>