Skip to content

Support ConstantAnnotation when extracting literal annotation arguments#9463

Merged
lrytz merged 1 commit intoscala:2.13.xfrom
lrytz:constAnnLiterals
Jan 29, 2021
Merged

Support ConstantAnnotation when extracting literal annotation arguments#9463
lrytz merged 1 commit intoscala:2.13.xfrom
lrytz:constAnnLiterals

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>
hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
(now that it's possible to do so, after scala/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/scala#10424

Co-authored-by: Seth Tisue <seth@tisue.net>
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
(now that it's possible to do so, after scala/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/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

Development

Successfully merging this pull request may close these issues.

4 participants