Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt
T
2015-05-12 19:43:17 +02:00

10 lines
212 B
Kotlin
Vendored

// !CHECK_TYPE
interface Tr
interface G<T>
fun test(tr: Tr) {
val v = tr as <!NO_TYPE_ARGUMENTS_ON_RHS!>G?<!>
// If v is not nullable, there will be a warning on this line:
checkSubtype<G<*>>(v!!)
}