## Compiler version 3.6.4 (and also the current 3.7 nightly) ## Minimized code ```Scala //> using scala 3.nightly //> using option -Wunused:imports object tpd: type Block = Trees.Block object Trees: case class Block(x: Int) trait Bug: import tpd.Block def foo: Unit = (??? : Any) match case Block(_) => ``` ## Output ``` [warn] ./S.scala:11:14 [warn] unused import [warn] import tpd.Block [warn] ^^^^^ ``` ## Expectation The import is used. The code does not compile without it. The type alias must be confusing the compiler.