Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/unsupported.fir.kt
T
2021-12-02 20:24:41 +03:00

15 lines
281 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNCHECKED_CAST
context(Any)
fun f(g: context(Any) () -> Unit, value: Any): context(A) () -> Unit {
return value as (context(A) () -> Unit)
}
context(String, Int)
class A {
context(Any)
val p: Any get() = 42
context(String, Int)
fun m() {}
}