2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
32 lines
732 B
Kotlin
Vendored
32 lines
732 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
|
|
class Outer<E> {
|
|
inner open class InnerBase<F>
|
|
inner class Inner<H> : InnerBase<H>() {
|
|
val prop: E = null!!
|
|
}
|
|
|
|
fun foo(x: InnerBase<String>, y: Any?, z: Outer<*>.InnerBase<String>) {
|
|
if (x is Inner) {
|
|
x.prop.checkType { _<E>() }
|
|
}
|
|
|
|
if (y is <!NO_TYPE_ARGUMENTS_ON_RHS!>Inner<!>) return
|
|
|
|
if (z is Inner) {
|
|
z.prop.checkType { _<Any?>() }
|
|
return
|
|
}
|
|
|
|
if (y is Outer<*>.Inner<*>) {
|
|
y.prop.checkType { _<Any?>() }
|
|
}
|
|
}
|
|
|
|
fun bar(x: InnerBase<String>, y: Any?, z: Outer<*>.InnerBase<String>) {
|
|
x as Inner
|
|
y as <!NO_TYPE_ARGUMENTS_ON_RHS!>Inner<!>
|
|
z as Inner
|
|
}
|
|
}
|