[FIR] Fix missing receiver type if anonymous function without label
This commit is contained in:
-12
@@ -1,12 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
package g
|
||||
|
||||
import java.util.HashSet
|
||||
fun <T, C: Collection<T>> convert(src: Collection<T>, dest: C): C = throw Exception("$src $dest")
|
||||
|
||||
fun test(l: List<Int>) {
|
||||
//todo should be inferred
|
||||
val r = convert(l, HashSet())
|
||||
r checkType { <!UNRESOLVED_REFERENCE!>_<!><HashSet<Int>>() }
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
|
||||
package g
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@ public fun <T> listOf(t: T): List<T> = TODO()
|
||||
|
||||
fun usage(c: List<String>) {
|
||||
val cn = c.ifEmpty { null }
|
||||
cn checkType { <!UNRESOLVED_REFERENCE!>_<!><List<String>?>() }
|
||||
cn checkType { _<List<String>?>() }
|
||||
|
||||
val cs = c.ifEmpty { listOf("x") }
|
||||
cs checkType { <!UNRESOLVED_REFERENCE!>_<!><List<String>>() }
|
||||
cs checkType { _<List<String>>() }
|
||||
}
|
||||
Reference in New Issue
Block a user