scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

Unused values reported out of order #13051

Open som-snytt opened 1 month ago

som-snytt commented 1 month ago

Scala version: 2.13.15

Under -Wnonunit-statement, for some if/else or blocks, warnings are presented "unsorted".

javac/JavaParsers.scala:1029:13: unused value
javac/JavaParsers.scala:1126:13: unused value
javac/JavaParsers.scala:1106:17: unused value

Problem

In order would be more convenient.

It's probably due to traversal order, but I don't know why all such warnings aren't sorted by position.

For cascading errors, you want the underlying cause first.