Open
Description
Here's a simplified scenario. Any insight would be greatly appreciated.
import com.github.plokhotnyuk.jsoniter_scala.core.*
import com.github.plokhotnyuk.jsoniter_scala.macros.*
trait Aggregate {
type Props
def propsCodec: JsonValueCodec[Props]
given JsonValueCodec[Props] = propsCodec
}
trait Events { self: Aggregate =>
case class MyEvent(props: Props)
// works here
// val myEventCodec: JsonValueCodec[MyEvent] = JsonCodecMaker.make
}
object Person extends Aggregate with Events {
case class Props(name: String, age: Int)
val propsCodec: JsonValueCodec[Props] = JsonCodecMaker.make
// No implicit 'com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec[_ >: scala.Nothing <: scala.Any]'
// defined for 'Events.this.Props'.
val myEventCodec: JsonValueCodec[MyEvent] = JsonCodecMaker.make
}