blob: f3378927c5dbb26ea1935e3124e01f1ebe1816f7 [file]
// IGNORE_BACKEND_K1: ANY
// LANGUAGE: +ContextParameters
class A(var x: String) {
fun foo(): String { return x }
}
var result = ""
val a: A = A("not OK")
context(a: A)
fun test1() {
result = a.foo()
}
fun box(): String {
with(A("OK")) {
test1()
}
return result
}