Closed
Description
Compiler version
3.5.2, 3.6.4 and latest nightly 3.7.1-RC1-bin-20250411-98c84c3-NIGHTLY
Minimized code
import scala.quoted.*
object test {
import scala.concurrent.duration.FiniteDuration
def applyImpl[A: Type](using Quotes): Expr[Unit] =
Type.of[A] match { case '[type d <: FiniteDuration; d] => '{ () } }
}
Output
-- [E198] Unused Symbol Warning: -----------------------------------------------
4 | import scala.concurrent.duration.FiniteDuration
| ^^^^^^^^^^^^^^
| unused import
Expectation
The import should not be reported unused since it's used in applyImpl
.
Note that the import is only reported unused when using a bounded type like '[type d <: FiniteDuration; d]
-- it's not reported unused if I just do '[FiniteDuration]
.