## Minimized code ```Scala class Test { sealed trait Role case object Admin extends Role case class Contributor(organization: String) extends Role println(summon[Mirror.Of[Role]]) } ``` ## Output ```scala // 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. ```scala 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).