Skip to content

suppress unchecked warnings globally #1781

@scabug

Description

@scabug

Currently, Scala supports suppressing unchecked warning only for single expression:

(x: @unchecked) match { ... }

However, some classes (test cases, for example) tend to have many places where unchecked warnings arise. There should be a way to disable unchecked warnings for the whole class, like this:

@unchecked
object MyTests { ... }

or disable unchecked warnings for the whole compiler run:

scalac -ignore-unchecked
<scalac unchecked="ignore" ... />

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions