Currently something similar to this code ```interf...
# getting-started
n
Currently something similar to this code
Copy code
interface 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
Copy code
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...)
s
I think your intuition is correct. The context receiver is effectively a parameter, so adding a new one would change the signature. It's implied in the KEEP also:
If 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.
1
🙏 1