Configurable warnings, warning suppression

Seems to work on my machine, where

scala --scala-version 2.13.2-bin-59cf05f-SNAPSHOT -e "def t = { 0; 1 }"
warning: a pure expression does nothing in statement position; multiline expressions might require enclosing parentheses
def t = { 0; 1 }
          ^

whilst

scala --scala-version 2.13.2-bin-59cf05f-SNAPSHOT -e "def t = { 0: @scala.annotation.silent; 1 }"

raises no warning. I updated SO Is there an equivalent to SuppressWarnings in Scala?

5 Likes