Put using underscored type arguments under a feature
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +PartiallySpecifiedTypeArguments
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun <K, T> foo(x: (K) -> T): Pair<K, T> = (1 as K) to (1f as T)
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +PartiallySpecifiedTypeArguments
|
||||
// WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: +PartiallySpecifiedTypeArguments
|
||||
|
||||
sealed class MyResult<out T>{
|
||||
data class Success<T>(val value: T): MyResult<T>()
|
||||
data class Failure(val exception: Throwable): MyResult<Nothing>()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: +PartiallySpecifiedTypeArguments
|
||||
|
||||
interface RProps
|
||||
open class RComponent<K, T> : Component<K, T>
|
||||
interface RState
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +PartiallySpecifiedTypeArguments
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun <K, T> foo(x: (K) -> T): Pair<K, T> = (1 as K) to (1f as T)
|
||||
|
||||
+1
@@ -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>
|
||||
Reference in New Issue
Block a user