"lambda to anonymous": add tests for qualified types (KT-7710)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun foo(f: () -> ArrayDeque<*>) {}
|
||||
|
||||
fun test() {
|
||||
foo <caret>{ ArrayDeque<Int>() }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun foo(f: () -> ArrayDeque<*>) {}
|
||||
|
||||
fun test() {
|
||||
foo(fun(): ArrayDeque<Int> {
|
||||
return ArrayDeque<Int>()
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
package test
|
||||
|
||||
data class My(val x: Int)
|
||||
|
||||
fun foo(f: () -> My) {}
|
||||
|
||||
fun test() {
|
||||
foo <caret>{ My(42) }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
package test
|
||||
|
||||
data class My(val x: Int)
|
||||
|
||||
fun foo(f: () -> My) {}
|
||||
|
||||
fun test() {
|
||||
foo(fun(): My {
|
||||
return My(42)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user