Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt
T
2019-11-19 11:00:09 +03:00

12 lines
278 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_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"
}