I have a code:
data class Pair(val x:Int, val y:Int)
val (i, j) = Pair(1,2)
i
error: unresolved reference: i
What am I doing wrong?
I have a code:
data class Pair(val x:Int, val y:Int)
val (i, j) = Pair(1,2)
i
error: unresolved reference: i
What am I doing wrong?
Destructuring declarations are not yet supported in REPL, here’s the issue: https://youtrack.jetbrains.com/issue/KT-5620