FIR: fix type index computation during enhancement

1. in/out type parameters count;
2. star projections take up 1 space in the tree.
This commit is contained in:
pyos
2021-08-02 11:53:11 +02:00
committed by teamcityserver
parent 5fec9f34b1
commit 8e122397b0
30 changed files with 194 additions and 263 deletions
@@ -22,5 +22,5 @@ FILE: main.kt
public final fun test_1(b: R|B<kotlin/Int>|, x: R|kotlin/Int|, inv: R|Inv<kotlin/Int>|): R|kotlin/Unit| {
R|<local>/b|.<Ambiguity: take, [/B.take, /B.take]>#(R|<local>/x|)
R|<local>/b|.<Ambiguity: take, [/B.take, /B.take]>#(Null(null))
R|<local>/b|.R|SubstitutionOverride</B.takeInv: R|kotlin/String|>|(R|<local>/inv|)
R|<local>/b|.<Ambiguity: takeInv, [/B.takeInv, /B.takeInv]>#(R|<local>/inv|)
}
+2 -2
View File
@@ -21,11 +21,11 @@ open <!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class B<!><V> : A<Any, V>() {
return ""
}
override fun takeInv(value: Inv<V>): String = ""
<!NOTHING_TO_OVERRIDE!>override<!> fun takeInv(value: Inv<V>): String = ""
}
fun test_1(b: B<Int>, x: Int, inv: Inv<Int>) {
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>take<!>(x)
b.<!NONE_APPLICABLE!>take<!>(null)
b.takeInv(inv)
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>takeInv<!>(inv)
}