[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
@@ -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>>() }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
package g
@@ -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>>() }
}