Skip to content

Conversation

mbovel
Copy link
Member

@mbovel mbovel commented Sep 4, 2025

Implements addendum discussed for #22620.

@mbovel
Copy link
Member Author

mbovel commented Sep 4, 2025

We should also disable the -rewrite for private[this] class parameters. Unfortunately, we don't know if we are in a parameters list at the point where we issue the rewrite. We'd probably need to thread that information there.

if mods1.is(Local) then
report.errorOrMigrationWarning(
em"""Ignoring [this] qualifier.
|This syntax will be deprecated in the future; it should be dropped.
|See: https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html${rewriteNotice(`3.4-migration`)}""",
in.sourcePos(),
MigrationVersion.RemoveThisQualifier)
if MigrationVersion.RemoveThisQualifier.needsPatch then
patch(source, Span(startOffset, in.lastOffset), "")

@mbovel mbovel marked this pull request as ready for review September 10, 2025 12:08
@mbovel
Copy link
Member Author

mbovel commented Sep 10, 2025

We should also disable the -rewrite for private[this] class parameters.

Discussed during today's compiler meeting; we won't fix the rewrite as it would require too many changes.

@mbovel mbovel enabled auto-merge September 10, 2025 12:09
@mbovel mbovel merged commit 7762b23 into scala:main Sep 10, 2025
44 checks passed
@mbovel mbovel deleted the mb/22620b branch September 10, 2025 14:12
WojciechMazur added a commit that referenced this pull request Sep 22, 2025
…age" to 3.7.4 (#23997)

Backports #23876 to the 3.7.4.

PR submitted by the release tooling.
[skip ci]
@WojciechMazur WojciechMazur added this to the 3.7.4 milestone Sep 23, 2025
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.

3 participants