[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
@@ -36,9 +36,9 @@ fun A.forEach() = ""
fun A.forEach(s: String) {}
fun test(a: A) {
a.forEach() checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
a.forEach() checkType { _<String>() }
a.forEach(1) checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
a.forEach(1) checkType { _<Int>() }
a.forEach("")
@@ -17,7 +17,7 @@ class B {
fun A.forEach() = this@B
fun test(a: A) {
a.forEach() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><A>() } // todo
a.forEach() checkType { _<A>() } // todo
with(a) {
forEach() checkType { _<A>() } // todo
@@ -34,7 +34,7 @@ fun test2(a: A) {
@kotlin.internal.HidesMembers
fun A.forEach(i: Int) = ""
a.forEach() checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
a.forEach() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><String>() }
a.forEach(1)
with(a) {
@@ -25,6 +25,6 @@ public class StaticOverrides {
fun test() {
StaticOverrides.A.<!AMBIGUITY!>foo<!> {} <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><Boolean>() }
StaticOverrides.B.foo {} checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
StaticOverrides.C.foo {} checkType { <!UNRESOLVED_REFERENCE!>_<!><Boolean>() }
StaticOverrides.B.foo {} checkType { _<String>() }
StaticOverrides.C.foo {} checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Boolean>() }
}