Skip to content
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

Support ConstantAnnotation when extracting literal annotation arguments #9463

Merged
merged 1 commit into from Jan 29, 2021

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Jan 29, 2021

This allows changing annotations like deprecated to extend ConstantAnnotation after a restarr.

See #9336 for context.

This allows changing annotations like `deprecated` to extend
`ConstantAnnotation` after a restarr.
@lrytz
Copy link
Member Author

lrytz commented Jan 29, 2021

@smarter is something similar needed for dotc? In nsc, annotations that are subtypes of ConstantAnnotation (and Java annotations) are represented differently internally.

@smarter
Copy link
Member

smarter commented Jan 29, 2021

Honestly no idea, I never got what ConstantAnnotation was for and Dotty doesn't treat it specially.

@lrytz
Copy link
Member Author

lrytz commented Jan 29, 2021

Dotty doesn't treat it specially

Then things should work the same if we ever change deprecated to ConstantAnnotation

@lrytz lrytz merged commit 99a6820 into scala:2.13.x Jan 29, 2021
SethTisue added a commit to BalmungSan/scala that referenced this pull request Mar 16, 2021
now that it's possible to do so, after scala#9463
SethTisue added a commit to BalmungSan/scala that referenced this pull request Mar 17, 2021
now that it's possible to do so, after scala#9463
SethTisue added a commit to BalmungSan/scala that referenced this pull request Mar 17, 2021
(now that it's possible to do so, after scala#9463)

In this case of e.g. `implicitNotFound`, this makes it clearer that
the custom error message must be a literal value.

Fixes scala#10424

Co-authored-by: Seth Tisue <seth@tisue.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants