[Scala 3] drop deprecated private[this] qualifier#874
Open
halotukozak wants to merge 4 commits into
Open
Conversation
Scala 3 deprecated `private[this]` since 3.4.0; plain `private` has identical semantics for class members (including vars). This removes the deprecation noise on the core module.
Scala 3 deprecated `private[this]` since 3.4.0; plain `private` has identical semantics.
Scala 3 deprecated `private[this]` since 3.4.0; plain `private` has identical semantics.
Note in MIGRATION.md §3 that `private[this]` was dropped project-wide. No access-level change; `private var` performs identically under Scala 3 (no accessor-synthesis difference).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scala 3 deprecated
private[this]since 3.4.0 — plainprivatehas identicalsemantics for class members (vals, defs, vars). This slice removes the qualifier
project-wide, eliminating the deprecation warnings.
sed-style rewrite; no logic touched@nowarn/-Wconfprivate[this] var→private var: in Scala 3 there is no accessor-synthesisdifference, so no perf delta and no JVM-level field-name change worth flagging
Slice metadata
upstream/scala-3@0887d555Verification
git grep -nE 'private\[this\]' -- '*.scala'→ 0 hitssbt compile Test/compile scalafmtCheckAll→ greenprivate[this]deprecations gone from compile output