[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
@@ -1,14 +0,0 @@
// !CHECK_TYPE
// FILE: A.java
public class A<T> {
public A<T>[] baz() { return null; }
}
// FILE: main.kt
fun foo1(x: A<*>) = x.baz()
fun foo2(x: A<*>) {
x.baz() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Array<out A<*>>>() }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// FILE: A.java
@@ -19,6 +19,6 @@ class In<in F> {
}
fun test() {
A.foo().x() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Any?>() }
A.bar().y(null)
A.foo().x() checkType { _<Any?>() }
A.bar().<!INAPPLICABLE_CANDIDATE!>y<!>(null)
}