Skip to content

Commit

Permalink
Change quiet flag to no longer silence warnings
Browse files Browse the repository at this point in the history
It has never been an option to the REPL user (until now),
and warnings can always be turned off with `-nowarn` CLI argument
or `:settings -nowarn`.
  • Loading branch information
natsukagami committed Dec 19, 2024
1 parent 4b7f321 commit 83fe5a7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions compiler/src/dotty/tools/repl/ReplDriver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,9 @@ class ReplDriver(settings: Array[String],
given Ordering[Diagnostic] =
Ordering[(Int, Int, Int)].on(d => (d.pos.line, -d.level, d.pos.column))

if (!quiet) {
(definitions ++ warnings)
.sorted
.foreach(printDiagnostic)
}
(if quiet then warnings else definitions ++ warnings)
.sorted
.foreach(printDiagnostic)

updatedState
}
Expand Down

0 comments on commit 83fe5a7

Please sign in to comment.