-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fromProduct on Mirror.Product broken for case class with companion case object #12919
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
Comments
maybe the companion should not cache the Mirror if it itself is a generic product / singleton (aka change to instead create a new mirror at each callsite) Edit: "generic product" here means the check the compiler does to see if a product mirror should be generated: |
@bishabosha Note that the product ( |
@bishabosha Ah, I now understand that you used "generic product" to signify a type for which the compiler synthesises |
Yes sorry, my comment was a bit confusing, I have updated my comment to link to the compiler code I was implying here. |
Compiler version
3.0.0 and 3.0.2-RC1-bin-20210622-a059dbc-NIGHTLY
Minimized code
Expectation
The
Mirror.Product[ClassWithCaseCompanion]
synthesised by the compiler should correctly instantiate the case class it claims to mirror, not its companion object. It seems the compiler gets confused when the companion object is a case object.The text was updated successfully, but these errors were encountered: