Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt
T
2015-04-29 16:33:24 +02:00

10 lines
204 B
Kotlin

// !CHECK_TYPE
trait Tr
trait 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!!)
}