[FIR] Fix missing receiver type if anonymous function without label
This commit is contained in:
-12
@@ -1,12 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
// KT-3372 Use upper bound in type argument inference
|
||||
|
||||
import java.util.HashSet
|
||||
|
||||
fun <T, C: MutableCollection<T>> Iterable<T>.toCollection(result: C) : C = throw Exception()
|
||||
|
||||
fun test(list: List<Int>) {
|
||||
val set = list.toCollection(HashSet())
|
||||
set checkType { <!UNRESOLVED_REFERENCE!>_<!><HashSet<Int>>() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
// KT-3372 Use upper bound in type argument inference
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun <T, R> Collection<T>.map(transform : (T) -> R) : List<R> = throw Exception()
|
||||
|
||||
fun test(list: List<List<Int>>) {
|
||||
|
||||
val list1 = list.map { it.map { "$it" } }
|
||||
list1 checkType { <!UNRESOLVED_REFERENCE!>_<!><List<List<String>>>() }
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun test() {
|
||||
val array = arrayOf(arrayOf(1))
|
||||
array checkType { <!UNRESOLVED_REFERENCE!>_<!><Array<Array<Int>>>() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun test() {
|
||||
|
||||
Reference in New Issue
Block a user