[FE] Support local contextual declarations

This commit is contained in:
Anastasiya Shadrina
2021-04-12 14:26:50 +07:00
committed by TeamCityServer
parent 43d11c7c4b
commit 875f4ea31c
10 changed files with 117 additions and 1 deletions
@@ -0,0 +1,14 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
interface A {
val ok get() = "OK"
}
class B : A
fun box(): String {
context(A) fun result() = ok
return with(B()) {
result()
}
}