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), "")

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.

2 participants