File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3426,9 +3426,10 @@ object Parsers {
34263426 }
34273427 if mods1.is(Local ) then
34283428 val span = Span (startOffset, in.lastOffset)
3429+ val p = if mods1.is(Private ) then " private" else " protected"
34293430 report.errorOrMigrationWarning(
34303431 em """ Ignoring [this] qualifier.
3431- |This syntax will be deprecated in the future; it should be dropped .
3432+ |The syntax ` $p [this]` will be deprecated in the future; just write ` $p ` instead .
34323433 |See: https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html ${rewriteNotice(`3.4-migration`)}""" ,
34333434 in.sourcePos().withSpan(span),
34343435 MigrationVersion .RemoveThisQualifier )
Original file line number Diff line number Diff line change 224 | private[this] def foo: Int = ??? // warn: migration warning
33 | ^^^^^^
44 | Ignoring [this] qualifier.
5- | This syntax will be deprecated in the future; it should be dropped .
5+ | The syntax `private[this]` will be deprecated in the future; just write `private` instead .
66 | See: https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html
77 | This construct can be rewritten automatically under -rewrite -source 3.4-migration.
88-- Warning: tests/warn/private-this-3.4.scala:5:11 ---------------------------------------------------------------------
995 | protected[this] def bar: Int = ??? // warn: migration warning
1010 | ^^^^^^
1111 | Ignoring [this] qualifier.
12- | This syntax will be deprecated in the future; it should be dropped .
12+ | The syntax `protected[this]` will be deprecated in the future; just write `protected` instead .
1313 | See: https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html
1414 | This construct can be rewritten automatically under -rewrite -source 3.4-migration.
You can’t perform that action at this time.
0 commit comments