Files
kotlin-fork/compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt
T
Pavel Kirpichenkov 39a87435ee [FIR/NI] Refactor type variable gathering from lambda types
Motivation:
- drop getArguments from type context as a duplicate of getArgumentList
- reduce the number of collection allocations in getAllDeeplyRelatedTypeVariables

Additional minor improvements, test data fixes
2020-10-13 11:00:21 +03:00

19 lines
361 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
class Host(var value: String) {
operator fun get(i: Int, j: Int, k: Int) = value
operator fun set(i: Int, j: Int, k: Int, newValue: String) {
value = newValue
}
}
fun box(): String {
var x = Host("")
run {
x[0, 0, 0] += "O"
x[0, 0, 0] += "K"
}
return x.value
}