A macro annotation on a class should also allow modifying the companion object #18805
smarter
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is especially useful when the companion object is synthetically generated by the compiler, in Scala 3 this is true for all classes since I can write:
Therefore I'd like to be able to put an annotation on
class Foo
to modify the behavior of the companionFoo.apply
, e.g.:@nicolasstucki I noticed that the description of #16454 mentions "Can annotate object to transform the companion class" which seems related, but I didn't find any test matching this behavior?
Beta Was this translation helpful? Give feedback.
All reactions