cd24adac32
#KT-14187 Fixed
16 lines
346 B
Kotlin
Vendored
16 lines
346 B
Kotlin
Vendored
// Type inference failed after smart cast
|
|
|
|
interface A<T>
|
|
interface B<T> : A<T>
|
|
|
|
fun <T> foo(b: A<T>) = b
|
|
|
|
fun <T> test(a: A<T>) {
|
|
if (<!USELESS_IS_CHECK!>a is Any<!>) {
|
|
// Error:(9, 9) Kotlin: Type inference failed: fun <T> foo(b: A<T>): kotlin.Unit
|
|
// cannot be applied to (A<T>)
|
|
foo(a)
|
|
}
|
|
foo(a) // ok
|
|
}
|