Skip to content

Cannot derive Mirror.SumOf for inherited trait #13935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
oscar-broman opened this issue Nov 12, 2021 · 0 comments · Fixed by #15847
Closed

Cannot derive Mirror.SumOf for inherited trait #13935

oscar-broman opened this issue Nov 12, 2021 · 0 comments · Fixed by #15847
Assignees
Milestone

Comments

@oscar-broman
Copy link

Compiler version

Latest version tested is 3.1.2-RC1-bin-20211102-82172ed-NIGHTLY

Minimized code

import scala.deriving.Mirror
// Works:
sealed trait HasFoo { sealed trait Foo; case object B extends Foo; summon[Mirror.SumOf[Foo]] }

// Doesn't work:
final class UsesFoo extends HasFoo { summon[Mirror.SumOf[Foo]] }

Output

no implicit argument of type deriving.Mirror.SumOf[UsesFoo.this.Foo] was found for parameter x of method summon in object Predef

Expectation

It should derive the mirror just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment