-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat: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.3.7
Minimized code
//> using scala 3.3.7
//> using options -Wunused:all
trait Codec[A]
class DiscrimatorCodec[A](val framing: [x] => Codec[x] => Codec[x])
def foo[A] =
new DiscrimatorCodec[A]([x] => (cx: Codec[x]) => cx)Output
❯ scala-cli compile u.scala
Compiling project (Scala 3.3.7, JVM (17))
[warn] ./u.scala:8:28
[warn] unused private member
[warn] new DiscrimatorCodec[A]([x] => (cx: Codec[x]) => cx)
[warn] ^
Compiled project (Scala 3.3.7, JVM (17))
Expectation
There should not be an "unused private member" warning on the final line of this source file.
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat: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.