[FIR] Fix missing receiver type if anonymous function without label

This commit is contained in:
simon.ogorodnik
2020-04-07 23:43:42 +03:00
parent d2fd377605
commit f573719cc1
143 changed files with 249 additions and 766 deletions
@@ -12,7 +12,7 @@ fun <E> bar(): List<E> = null!!
fun baz() {
x checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
y checkType { <!UNRESOLVED_REFERENCE!>_<!><List<Int>>() }
z checkType { <!UNRESOLVED_REFERENCE!>_<!><List<Int>>() }
x checkType { _<String>() }
y checkType { _<List<Int>>() }
z checkType { _<List<Int>>() }
}
@@ -12,11 +12,11 @@ fun <E> id(x: E) = x
fun <E> l(x: E): List<E> = null!!
fun foo(a: A) {
a.x checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
a.y checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
a.y2 checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
a.z checkType { <!UNRESOLVED_REFERENCE!>_<!><List<String>>() }
a.z2 checkType { <!UNRESOLVED_REFERENCE!>_<!><List<List<String>>>() }
a.x checkType { _<Int>() }
a.y checkType { _<Int>() }
a.y2 checkType { _<Int>() }
a.z checkType { _<List<String>>() }
a.z2 checkType { _<List<List<String>>>() }
with(a) {
1.u checkType { _<Int>() }
@@ -4,6 +4,6 @@ val x get() = null
val y get() = null!!
fun foo() {
x checkType { <!UNRESOLVED_REFERENCE!>_<!><Nothing?>() }
y checkType { <!UNRESOLVED_REFERENCE!>_<!><Nothing>() }
x checkType { _<Nothing?>() }
y checkType { _<Nothing>() }
}
@@ -18,20 +18,20 @@ class C : B(), A {
override var y
get() = super.y
set(value) {
value checkType { <!INAPPLICABLE_CANDIDATE!>_<!><String>() }
value checkType { _<String>() }
}
override var z
get() = ""
set(value) {
value checkType { <!INAPPLICABLE_CANDIDATE!>_<!><String>() }
value checkType { _<String>() }
}
}
fun foo(c: C) {
c.x checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
c.y checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
c.z checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
c.x checkType { _<Int>() }
c.y checkType { _<String>() }
c.z checkType { _<String>() }
c.y = ""
c.y = 1
@@ -11,11 +11,11 @@ fun <E> id(x: E) = x
fun <E> l(x: E): List<E> = null!!
fun foo() {
x checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
y checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
y2 checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
z checkType { <!UNRESOLVED_REFERENCE!>_<!><List<String>>() }
z2 checkType { <!UNRESOLVED_REFERENCE!>_<!><List<List<String>>>() }
x checkType { _<Int>() }
y checkType { _<Int>() }
y2 checkType { _<Int>() }
z checkType { _<List<String>>() }
z2 checkType { _<List<List<String>>>() }
1.u checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
1.u checkType { _<Int>() }
}
@@ -2,7 +2,7 @@
var x
get() = 1
set(q) {
q checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
q checkType { _<Int>() }
}
var noSetter
@@ -10,8 +10,8 @@ var noSetter
fun foo() {
x checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
noSetter checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
x checkType { _<Int>() }
noSetter checkType { _<Int>() }
x = 1
x = ""