"lambda to anonymous": add tests for qualified types (KT-7710)

This commit is contained in:
Mikhail Glukhikh
2018-05-11 11:51:22 +03:00
parent 257664cf1b
commit 1ba99fde56
6 changed files with 54 additions and 1 deletions
@@ -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)
})
}