Files
kotlin/compiler/testData/codegen/box/multiDecl/component.kt
Alexander Udalov 7ce62a5b64 Remove generated codegen tests, move all testData to box/
A single test file will be generated out of box/ directory
2013-01-28 18:20:21 +04:00

17 lines
374 B
Kotlin

class S(val a: String, val b: String) {
fun component1() : String = a
fun component2() : String = b
}
fun S.component3() = ((a + b) as java.lang.String).substring(2)
class Tester() {
fun box() : String {
val (o,k,ok,ok2) = S("O","K")
return o + k + ok + ok2
}
fun S.component4() = ((a + b) as java.lang.String).substring(2)
}
fun box() = Tester().box()