ClassFormatError when using Context Receivers
I was playing around with context receivers (added the opt-in compiler argument). The following code compiles, but throws a ClassFormatException:
package test
interface Semigroup<A> {
fun op(x: A, y: A): A
}
object PlusSemigroup : Semigroup {
override fun op(x: Int, y: Int): Int = x + y
}
data class Box<A>(val value: A)
context(Semigroup<A>)
interface BoxSemigroup<A> : Semigroup {
override fun op(x: Box<A>, y: Box<A>): Box<A> =
Box(op(x.value, y.value))
}
fun <A>...