This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A() { | |
var state: Any | |
} | |
fun A(state: Any): A { | |
val a = A() | |
a.state = state | |
return a | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Result(val x: Int, val y: String) | |
fun computeSomething(): Result { | |
return Result(42, "") | |
} | |
fun main() { | |
val (x, y) = computeSomething() | |
println(x) | |
println(y) |
NewerOlder