Don't fix a type variable into the intersection type if there is an explicit expected type
^KT-43303 Fixed ^KT-42396 Fixed ^KT-42472 Fixed
This commit is contained in:
@@ -12,7 +12,7 @@ fun test(x: X<Number>) {
|
||||
fun <S, D: S> g() {
|
||||
fun <T : S> foo(): T = TODO()
|
||||
|
||||
val <!UNUSED_VARIABLE!>y<!> = <!TYPE_INFERENCE_UPPER_BOUND_VIOLATED{OI}!>foo<!>() as Int
|
||||
val <!UNUSED_VARIABLE!>y<!> = <!TYPE_INFERENCE_UPPER_BOUND_VIOLATED{OI}, TYPE_MISMATCH!>foo<!>() as Int
|
||||
|
||||
val <!UNUSED_VARIABLE!>y2<!> = foo() as D
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user