Files
kotlin-fork/compiler/testData/codegen/box/extensionClasses/propertyWithContext.kt
T
2022-08-24 15:36:42 +00:00

18 lines
273 B
Kotlin
Vendored

// LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// ISSUE: KT-53706
fun box(): String {
return with(SomeContext()) {
"error".foo
}
}
class SomeContext {
val value: String = "OK"
}
context(SomeContext)
val String.foo: String
get() = value