Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/kt15439_completeCall.kt
T
Mikhail Zarechenskiy 2cac6a9e7d Improve inference on generics for callable references
#KT-10711 Fixed
 #KT-12802 Fixed
 #KT-12964 Fixed
 #KT-15439 Fixed

Analyze callable references in `dependent` mode, then complete them with
respect to expected types
2017-01-24 02:15:26 +03:00

11 lines
310 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_VARIABLE
fun test() {
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)
}