-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Closed
Copy link
Labels
area:implicitsrelated to implicitsrelated to implicitsarea:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugstat:fixed in nextThe issue was fixed in Next and only still applies to LTS.The issue was fixed in Next and only still applies to LTS.
Description
Compiler version
3.6.4
Minimized code
package testing
object Syntax {
implicit def conversion(a: DummyClass): DummyClass = new DummyClass
}
class DummyClass
import Syntax.*
case class CaseClass(field: Boolean)
Note: I could not reproduce this in the REPL
Output
Expectation
The above code should return the following warning:
[warn] -- [E198] Test2.scala:9:14
[warn] 9 |import Syntax.*
[warn] | ^
[warn] | unused import
[warn] one warning found
As far as I can tell, this warning behaves correctly for:
- trait
- class
- abstract class
- object
- def
The warning behaves incorrectly for:
- case class
- case object (even trivial ones)
Note also this occurs even if the implicit conversion is completely irrelevant to any types involved, as in the above example
Metadata
Metadata
Assignees
Labels
area:implicitsrelated to implicitsrelated to implicitsarea:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugstat:fixed in nextThe issue was fixed in Next and only still applies to LTS.The issue was fixed in Next and only still applies to LTS.