Skip to content

wrong position for [this] #23940

@He-Pin

Description

@He-Pin

Compiler version

If you're not sure which version you're using, run print scalaVersion from sbt.
(If you're running scalac manually, use scalac -version instead.)

If possible, check if your issue appears in the nightly version of the compiler! For example, in Scala CLI (the scala/scala-cli runner script), you can use //> using scala 3.nightly (or -S 3.nightly from the command line) to grab the latest one.

Minimized code

[warn] -- Warning: /home/runner/work/scala/scala/src/library/scala/math/Equiv.scala:250:16 
[warn] 250 |  private[this] final class OptionEquiv[T](private val eqv: Equiv[T]) extends Equiv[Option[T]] {
[warn]     |                ^
[warn]     |Ignoring [this] qualifier.
[warn]     |This syntax will be deprecated in the future; it should be dropped.

Expectation

[warn] -- Warning: /home/runner/work/scala/scala/src/library/scala/math/Equiv.scala:250:16 
[warn] 250 |  private[this] final class OptionEquiv[T](private val eqv: Equiv[T]) extends Equiv[Option[T]] {
[warn]     |          ^
[warn]     |Ignoring [this] qualifier.
[warn]     |This syntax will be deprecated in the future; it should be dropped.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions