[FIR] Fix missing receiver type if anonymous function without label
This commit is contained in:
Vendored
+7
-7
@@ -9,24 +9,24 @@ fun bar() {
|
||||
b <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><String>() }
|
||||
}
|
||||
|
||||
x checkType { <!UNRESOLVED_REFERENCE!>_<!><(A) -> Unit>() }
|
||||
x checkType { _<(A) -> Unit>() }
|
||||
|
||||
val y = { (<!UNRESOLVED_REFERENCE!>a: Int<!>, <!UNRESOLVED_REFERENCE!>b<!>): A ->
|
||||
a checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
|
||||
a checkType { _<Int>() }
|
||||
b <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><String>() }
|
||||
}
|
||||
|
||||
y checkType { <!UNRESOLVED_REFERENCE!>_<!><(A) -> Unit>() }
|
||||
y checkType { _<(A) -> Unit>() }
|
||||
|
||||
val y2 = { (<!UNRESOLVED_REFERENCE!>a: Number<!>, <!UNRESOLVED_REFERENCE!>b<!>): A ->
|
||||
a checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
|
||||
a checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Int>() }
|
||||
b <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!UNRESOLVED_REFERENCE!>_<!><String>() }
|
||||
}
|
||||
|
||||
y2 checkType { <!UNRESOLVED_REFERENCE!>_<!><(A) -> Unit>() }
|
||||
y2 checkType { _<(A) -> Unit>() }
|
||||
|
||||
val z = { (<!UNRESOLVED_REFERENCE!>a: Int<!>, <!UNRESOLVED_REFERENCE!>b: String<!>) ->
|
||||
a checkType { <!UNRESOLVED_REFERENCE!>_<!><Int>() }
|
||||
b checkType { <!UNRESOLVED_REFERENCE!>_<!><String>() }
|
||||
a checkType { _<Int>() }
|
||||
b checkType { _<String>() }
|
||||
}
|
||||
}
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
fun test() {
|
||||
val a = if (true) {
|
||||
val x = 1
|
||||
({ x })
|
||||
} else {
|
||||
{ 2 }
|
||||
}
|
||||
a checkType { <!UNRESOLVED_REFERENCE!>_<!><() -> Int>() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
fun test() {
|
||||
val a = if (true) {
|
||||
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
fun <T> id(t: T) = t
|
||||
|
||||
fun foo() {
|
||||
val i = id { 22 } //type inference error: no information for parameter
|
||||
i checkType { <!UNRESOLVED_REFERENCE!>_<!><()->Int>() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
fun <T> id(t: T) = t
|
||||
|
||||
|
||||
Reference in New Issue
Block a user