Skip to content

Don't warn unused param of implicit marker #12935

@som-snytt

Description

@som-snytt

Reproduction steps

Scala version: 2.13.12

//> using options -Wunused:implicits

trait CanEqual[A, B]

class EqTest {
  implicit class ArrowAssert[A](a: A) {
    def ==>[B](b: B)(implicit ev: CanEqual[A, B]): Boolean = a == b // no warn, no declared members
  }
}

Problem

Warning is omitted for certain well-known type classes (=:=, etc). It would be nice to not warn if the typeclass declares no members, as no usage is meaningful except passing it down the stack.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions