Closed
Description
Compiler version
3.7.1-RC1-bin-20250328-d519790-NIGHTLY
Minimized code
trait Test[F[_], Ev] {
def apply[A, B](fa: F[A])(f: A => B)(using ev: Ev): F[B]
}
given testId: Test[[a] =>> a, Unit] =
new Test[[a] =>> a, Unit] {
def apply[A, B](fa: A)(f: A => B)(using ev: Unit): B = f(fa)
}
Output
[warn] -- [E198] Unused Symbol Warning: /Users/matt/scala3.7-nightly-unused/src/main/scala/example/Test.scala:7:44
[warn] 7 | def apply[A, B](fa: A)(f: A => B)(using ev: Unit): B = f(fa)
[warn] | ^^
[warn] | unused implicit parameter
Expectation
The parameter should not be reported unused since it's required to satisfy the apply
method override.
This is similar to #22742 which @som-snytt fixed in #22757 by suppressing unused warnings for explicit params in overrides -- could the same be done for implicits?