FIR: use captureFromTypeParameterUpperBoundIfNeeded for argument types

#KT-48161 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-08-09 12:19:49 +03:00
parent 73a8b4544a
commit a04913a197
7 changed files with 58 additions and 4 deletions
@@ -1,8 +1,8 @@
interface Inv<T>
fun <Y: X, X : Inv<out String>> foo(x: X, y: Y) {
val rX = bar(<!ARGUMENT_TYPE_MISMATCH!>x<!>)
rX.<!UNRESOLVED_REFERENCE!>length<!>
val rX = bar(x)
rX.length
val rY = bar(<!ARGUMENT_TYPE_MISMATCH!>y<!>)
rY.<!UNRESOLVED_REFERENCE!>length<!>