c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
22 lines
464 B
Kotlin
Vendored
22 lines
464 B
Kotlin
Vendored
// IGNORE_BACKEND: WASM
|
|
// WASM_MUTE_REASON: STDLIB_TEXT
|
|
// WITH_STDLIB
|
|
|
|
class S(val a: String, val b: String) {
|
|
operator fun component1() : String = a
|
|
operator fun component2() : String = b
|
|
}
|
|
|
|
operator fun S.component3() = ((a + b) as String).substring(2)
|
|
|
|
class Tester() {
|
|
fun box() : String {
|
|
val (o,k,ok,ok2) = S("O","K")
|
|
return o + k + ok + ok2
|
|
}
|
|
|
|
operator fun S.component4() = ((a + b) as String).substring(2)
|
|
}
|
|
|
|
fun box() = Tester().box()
|