Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt
T
2013-09-13 22:41:06 +02:00

8 lines
167 B
Kotlin

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