Skip to content

[Scala 3] drop deprecated private[this] qualifier#874

Open
halotukozak wants to merge 4 commits into
AVSystem:scala-3from
halotukozak:03-09-private-this
Open

[Scala 3] drop deprecated private[this] qualifier#874
halotukozak wants to merge 4 commits into
AVSystem:scala-3from
halotukozak:03-09-private-this

Conversation

@halotukozak

Copy link
Copy Markdown
Member

Summary

Scala 3 deprecated private[this] since 3.4.0 — plain private has identical
semantics for class members (vals, defs, vars). This slice removes the qualifier
project-wide, eliminating the deprecation warnings.

  • 64 occurrences across 21 files in core / hocon / mongo
  • Mechanical sed-style rewrite; no logic touched
  • No new @nowarn / -Wconf
  • private[this] varprivate var: in Scala 3 there is no accessor-synthesis
    difference, so no perf delta and no JVM-level field-name change worth flagging
  • MIGRATION.md §3 updated

Slice metadata

  • Slice 3.9
  • Independent
  • Depends-on: none
  • Base: upstream/scala-3@0887d555

Verification

  • git grep -nE 'private\[this\]' -- '*.scala' → 0 hits
  • sbt compile Test/compile scalafmtCheckAll → green
  • No new warnings; private[this] deprecations gone from compile output

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).
@halotukozak halotukozak added this to the Scala 3 milestone Jun 1, 2026
@halotukozak halotukozak marked this pull request as ready for review June 1, 2026 21:43
@halotukozak halotukozak self-assigned this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant