Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/upperBounds/inferringVariableByMaterializeAndUpperBound.fir.kt
T
2021-06-07 15:25:47 +03:00

15 lines
314 B
Kotlin
Vendored

// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS
interface I
interface Inv<P>
interface Out<out T>
class Bar<U : I>(val x: Inv<Out<U>>)
fun <T> materializeFoo(): Inv<T> = null as Inv<T>
fun main() {
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Bar<!>(materializeFoo())
}