[FIR] Fix missing receiver type if anonymous function without label
This commit is contained in:
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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>() }
|
||||
}
|
||||
Reference in New Issue
Block a user