Files
kotlin-fork/compiler/testData/codegen/box/defaultArguments/convention/kt16520_old.kt
T
Ilya Chernikov 5b3816cce5 Test infra: refactor IGNORE_BACKEND directive
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00

20 lines
410 B
Kotlin
Vendored

// !LANGUAGE: -ProperArrayConventionSetterWithDefaultCalls
// IGNORE_BACKEND: JVM_IR
// FIR status: don't support legacy feature
// TARGET_BACKEND: JVM
var result = "fail"
class A {
operator fun set(
i1: Int,
i2: Int = 1,
v: String
) {
result = "" + i1 + i2 + v
}
}
fun box(): String {
A()[1] = "OK"
return if (result != "10OK") "fail: $result" else "OK"
}