7255ee0a5b
See the test and the issue for the clarification
After the change 7898922066
the expected type for "a" in expression "foo(a)" is A<E & B<*>>
But we have the original type A<E> and smart-casted enriched type A<B<*>>
(non of them is a subtype of A<E & B<*>>)
and fail in checkTypeInternal when checking types in during completion
^KT-35844 Fixed
18 lines
269 B
Kotlin
Vendored
18 lines
269 B
Kotlin
Vendored
// SKIP_TXT
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
// !LANGUAGE: +NewInference
|
|
|
|
class A<X>
|
|
|
|
class B<T> {
|
|
fun b(): T = TODO()
|
|
}
|
|
|
|
fun <Y> foo(c: A<Y>): Y = TODO()
|
|
|
|
fun <E> main(a: A<E>) {
|
|
a <!UNCHECKED_CAST!>as A<B<*>><!>
|
|
|
|
foo(<!DEBUG_INFO_SMARTCAST!>a<!>).b()
|
|
}
|