Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.fir.kt
T
pyos 29f95c7df2 FIR: improve inference of implicit type arguments in casts
Type parameters do not necessarily match one-to-one, or preserve order.
2021-01-18 18:01:03 +03:00

9 lines
181 B
Kotlin
Vendored

// !CHECK_TYPE
interface Tr
interface G<T>
fun test(tr: Tr?) {
val v = tr as <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>G?<!>
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><G<*>>(v!!)
}