FIR: improve inference of implicit type arguments in casts

Type parameters do not necessarily match one-to-one, or preserve order.
This commit is contained in:
pyos
2021-01-06 14:39:22 +01:00
committed by Dmitriy Novozhilov
parent acdc1f532b
commit 29f95c7df2
32 changed files with 134 additions and 149 deletions
@@ -4,6 +4,6 @@ interface Tr
interface G<T>
fun test(tr: Tr) {
val v = tr as G
checkSubtype<G<*>>(v)
val v = tr as <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>G<!>
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><G<*>>(v)
}