You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
about foo not being visible on other (as in Scala 2).
about private[this] being deprecated/dropped in Scala 3, and having the same meaning asprivate.
In Scala 3.4.0 Nightly, the compiler warning still does not mention the unexpected semantics of[this] in this context, which doesn't seem documented anywhere. Being deprecated is not the same as being ignored.
The text was updated successfully, but these errors were encountered:
The migration warning was added in 3.4. I will update the documentation to mke this clear.
The current warning is
-- Warning: t/Test.scala:2:16 --------------------------------------------------
2 | private[this] def foo: Int = 1
| ^
|The [this] qualifier will be deprecated in the future; it should be dropped.
|See: https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html
|This construct can be rewritten automatically under -rewrite -source 3.4-migration.
Compiler version
3.3.1
Minimized code
Compiler output
Compiles fine.
Expectation
Compiler warning or error, either
foo
not being visible onother
(as in Scala 2).private[this]
being deprecated/dropped in Scala 3, and having the same meaning asprivate
.In Scala 3.4.0 Nightly, the compiler warning still does not mention the unexpected semantics of
[this]
in this context, which doesn't seem documented anywhere. Being deprecated is not the same as being ignored.The text was updated successfully, but these errors were encountered: