Files
kotlin-fork/compiler/testData/diagnostics/tests/cast/IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt
T
2013-09-05 14:17:33 +04:00

6 lines
215 B
Kotlin

open class BaseTwo<A, B>
open class DerivedWithOne<D>: BaseTwo<D, String>()
// a is BaseTwo<T, U> => if (a is DerivedWithOne<?>) a is DerivedWithOne<T>
fun <T, U> testing(a: BaseTwo<T, U>) = a is DerivedWithOne<T>