5f9f01fe4e
Note that `testDelegates` now fails due to KT-37638 and
`testSimpleIn` fails due to problems with type parameters
of inner classes
32 lines
519 B
Kotlin
Vendored
32 lines
519 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !LANGUAGE: +NewInference
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
|
|
|
interface I {
|
|
fun foo()
|
|
}
|
|
|
|
data class Pair<X, Y>(val fst: X, val snd: Y)
|
|
|
|
class A(f: Pair<Int, (I) -> Unit>? = null)
|
|
|
|
class B(f: ((I) -> Unit)? = null)
|
|
|
|
fun main() {
|
|
val cond = true
|
|
A(
|
|
if (cond) {
|
|
Pair(1, { baz -> baz.foo() })
|
|
} else {
|
|
null
|
|
}
|
|
)
|
|
B(
|
|
if (cond) {
|
|
{ baz -> baz.foo() }
|
|
} else {
|
|
null
|
|
}
|
|
)
|
|
}
|