Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/kt2829.kt
T

17 lines
256 B
Kotlin
Vendored

// FIR_IDENTICAL
package test
fun a(s: String) { // <- ERROR
val (x, y) = Pair("", s)
println(x + y)
}
fun b(s: String) {
val x = Pair("", s)
println(x)
}
//from library
data class Pair<A, B>(val a: A, val b: B)
fun println(a: Any?) = a