[FE] Support local contextual declarations
This commit is contained in:
committed by
TeamCityServer
parent
43d11c7c4b
commit
875f4ea31c
+14
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user