Files
kotlin-fork/compiler/testData/codegen/box/callableReference/property/kt12044.kt
T
2019-11-19 11:00:09 +03:00

14 lines
422 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KT-12044 Assertion "Rewrite at slice LEXICAL_SCOPE" for 'if' with property references
fun box(): String {
data class Pair<F, S>(val first: F, val second: S)
val (x, y) =
Pair(1,
if (1 == 1)
Pair<String, String>::first
else
Pair<String, String>::second)
return y.get(Pair("OK", "Fail"))
}