Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt
T
2018-06-09 19:15:38 +03:00

12 lines
273 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
class X {
operator fun get(name: String, type: String = "none") = name + type
}
fun box(): String {
if (X().get("a") != "anone") return "fail 1: ${X().get("a")}"
if (X()["a"] != "anone") return "fail 2: ${X()["a"]}"
return "OK"
}