-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore
Description
I'm on vacation and don't have time to really think about this or dig deeper, but since it's a regression I thought I should report it promptly.
//> using scala 3.5.0-RC2
//> using option -Wunused:imports
def test =
import Ordering.Implicits.{given Ordering[?]}
summon[Ordering[Seq[Int]]]
on 3.5.0-RC2 this gives:
[warn] unused import
[warn] import Ordering.Implicits.{given Ordering[?]}
[warn] ^^^^^^^^^^^^^^^^^
but the import is definitely used — the code doesn't compile without it
note that I can write import Ordering.Implicits.seqOrdering
instead, which is better code anyway, the original code is admittedly peculiar (I don't remember what I might have been thinking when I wrote it)
minimized from https://github.com/SethTisue/Project-Euler/blob/main/src/test/scala/54.scala
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymore