Norbi
12/14/2023, 10:54 AMinterface A {
val a: Any
}
interface B: A {
context(C) // <--- an additional context of C is added to the overridden property
override val a: Any
}
does not compile with an
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
compiler crash.
My question is, will it be supported in the future?
(I'm not an expert but with the additional context
it seems not to be an 'override' anymore...)Sam
12/14/2023, 11:08 AMIf a function or a property accessor is a member of some class or interface and has context receivers, then its overrides must have context receivers of the same types.