blob: 8534f7c23cc4a8be8cb6e26b8fba40523af2df68 [file]
// 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
}