Closed
Description
Minimized code
class Test {
sealed trait Role
case object Admin extends Role
case class Contributor(organization: String) extends Role
println(summon[Mirror.Of[Role]])
}
Output
// no implicit argument of type deriving.Mirror.Of[Test.this.Role] was found for parameter x of method summon in object Predef
Expectation
It should be able to derive the mirror as if it was inside the companion object.
object Test {
sealed trait Role
case object Admin extends Role
case class Contributor(organization: String) extends Role
println(summon[Mirror.Of[Role]])
}
I found this while I was port play-json to dotty (https://github.com/playframework/play-json/pull/555/files).