Skip to content

Cannot put annotation on package object #12496

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
adampauls opened this issue Nov 15, 2021 · 1 comment
Closed

Cannot put annotation on package object #12496

adampauls opened this issue Nov 15, 2021 · 1 comment

Comments

@adampauls
Copy link

reproduction steps

using Scala 2.13.7

@scala.annotation.nowarn
package object pack

problem

Fails to compile with

expected start of definition

I am trying to silence deprecation warning on package object inheritance while we migrate to Scala 3. The annotation location parses fine if the package keyword is removed. Perhaps I'm supposed to put the annotation somewhere else, but I couldn't figure out where.

@som-snytt
Copy link

Duplicates #3115 where the annotation of interest was deprecation.

-Wconf may suffice. cat=deprecation with msg=.... It's a parser warning, so there is no site=p, alas.

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

No branches or pull requests

3 participants