[FIR] Good test data fixes (around captured types)

This commit is contained in:
Mikhail Glukhikh
2020-09-10 09:24:45 +03:00
parent c2d9fc469a
commit 4605a65f41
38 changed files with 76 additions and 135 deletions
@@ -21,7 +21,7 @@ class Inv<T>() {
fun testInOut() {
In<String>().f("1");
(null as In<in String>).f("1")
(null as In<*>).f("1") // Wrong Arg
(null as In<*>).<!NONE_APPLICABLE!>f<!>("1") // Wrong Arg
In<String>().f(1);
(null as In<in String>).f(1)
@@ -37,16 +37,16 @@ fun testInOut() {
Inv<Int>().f(1)
(null as Inv<in Int>).f(1)
(null as Inv<out Int>).f(1) // !!
(null as Inv<*>).f(1) // !!
(null as Inv<out Int>).<!INAPPLICABLE_CANDIDATE!>f<!>(1) // !!
(null as Inv<*>).<!INAPPLICABLE_CANDIDATE!>f<!>(1) // !!
Inv<Int>().inf(1)
(null as Inv<in Int>).inf(1)
(null as Inv<out Int>).inf(1) // !!
(null as Inv<*>).inf(1) // !!
(null as Inv<out Int>).<!INAPPLICABLE_CANDIDATE!>inf<!>(1) // !!
(null as Inv<*>).<!INAPPLICABLE_CANDIDATE!>inf<!>(1) // !!
Inv<Int>().outf()
checkSubtype<Int>((null as Inv<in Int>).outf()) // Type mismatch
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><Int>((null as Inv<in Int>).outf()) // Type mismatch
(null as Inv<out Int>).outf()
(null as Inv<*>).outf()