You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add @nowarn annotation for local warning suppression
Integrate the fantastic [silencer](https://github.com/ghik/silencer)
compiler plugin by @ghik into the compiler, which allows suppressing
warnings locally using he `@nowarn` annotation.
The `@nowarn` annotation suppresses warnings within the scope covered by
the annotation.
- `@nowarn def foo = ...`, `@nowarn class C { ... }` suppress
warnings in a definition
- `expression: @nowarn` suppress warnings in a specific expression
The annotation can be configured to filter selected warnings, for
example `@nowarn("cat=deprecation")` only suppresses deprecation
warnings. The filter configuration syntax is the same as in `-Wconf`.
MiMa exception for addition of `scala.annotation.nowarn`
Reporting warnings is now delayed until after typer, because the typer
collects `@nowarn` annotations.
If we stop before typer (e.g., because there are errors in the parser),
all warnings are shown, even if they are enclosed in `@silent`.
If a phase before typer has both errors and warnings, all errors are
printed before the warnings.
0 commit comments