Skip to content

Commit dc0b43c

Browse files
Deprecation warnings for old syntax: private[this] (#18819)
This is the first part of #18863 * In `3.4` we emit the deprecation warning and enable the patch with -rewrite. * In `future` we emit we make this syntax an error ```scala //> using options -source future private[this] def foo: Int = ??? // error ``` ```diff //> using options -rewrite -source 3.4-migration - private[this] def foo: Int = ??? + private def foo: Int = ??? ```
2 parents b6aa90a + a0699ae commit dc0b43c

File tree

63 files changed

+305
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+305
-168
lines changed

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ object projects:
362362
project = "shapeless-3",
363363
sbtTestCommand = "testJVM; testJS",
364364
sbtDocCommand = forceDoc("typeable", "deriving"),
365-
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), // due to -Xfatal-warnings
365+
scalacOptions = "-source" :: "3.3" :: SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), // due to -Xfatal-warnings
366366
)
367367

368368
lazy val xmlInterpolator = SbtCommunityProject(

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
160160
* every time we compare components of the previous pair of types.
161161
* This type is used for capture conversion in `isSubArgs`.
162162
*/
163-
private [this] var leftRoot: Type | Null = null
163+
private var leftRoot: Type | Null = null
164164

165165
/** Are we forbidden from recording GADT constraints? */
166166
private var frozenGadt = false

compiler/src/dotty/tools/dotc/core/classfile/ReusableDataReader.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import java.io.{DataInputStream, InputStream}
99
import java.nio.{BufferUnderflowException, ByteBuffer}
1010

1111
final class ReusableDataReader() extends DataReader {
12-
private[this] var data = new Array[Byte](32768)
13-
private[this] var bb: ByteBuffer = ByteBuffer.wrap(data)
14-
private[this] var size = 0
15-
private[this] val reader: DataInputStream = {
12+
private var data = new Array[Byte](32768)
13+
private var bb: ByteBuffer = ByteBuffer.wrap(data)
14+
private var size = 0
15+
private val reader: DataInputStream = {
1616
val stream = new InputStream {
1717
override def read(): Int = try {
1818
bb.get & 0xff

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,15 +3112,23 @@ object Parsers {
31123112
if (in.token == LBRACKET) {
31133113
if (mods.is(Local) || mods.hasPrivateWithin)
31143114
syntaxError(DuplicatePrivateProtectedQualifier())
3115-
inBrackets {
3115+
val startOffset = in.offset
3116+
val mods1 = inBrackets {
31163117
if in.token == THIS then
3117-
if sourceVersion.isAtLeast(future) then
3118-
deprecationWarning(
3119-
em"The [this] qualifier will be deprecated in the future; it should be dropped.")
31203118
in.nextToken()
31213119
mods | Local
31223120
else mods.withPrivateWithin(ident().toTypeName)
31233121
}
3122+
if mods1.is(Local) then
3123+
report.gradualErrorOrMigrationWarning(
3124+
em"""The [this] qualifier will be deprecated in the future; it should be dropped.
3125+
|See: https://docs.scala-lang.org/scala3/reference/dropped-features/this-qualifier.html${rewriteNotice(`3.4-migration`)}""",
3126+
in.sourcePos(),
3127+
warnFrom = `3.4`,
3128+
errorFrom = future)
3129+
if sourceVersion.isMigrating && sourceVersion.isAtLeast(`3.4-migration`) then
3130+
patch(source, Span(startOffset, in.lastOffset), "")
3131+
mods1
31243132
}
31253133
else mods
31263134

compiler/src/dotty/tools/dotc/reporting/WConf.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ object WConf:
117117
else Right(WConf(configs))
118118

119119
class Suppression(val annotPos: SourcePosition, filters: List[MessageFilter], val start: Int, end: Int, val verbose: Boolean):
120-
private[this] var _used = false
120+
private var _used = false
121121
def used: Boolean = _used
122122
def markUsed(): Unit = { _used = true }
123123

compiler/src/dotty/tools/dotc/semanticdb/generated/Access.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ final case class AccessMessage(
5050
sealedValue: dotty.tools.dotc.semanticdb.AccessMessage.SealedValue = dotty.tools.dotc.semanticdb.AccessMessage.SealedValue.Empty
5151
) extends SemanticdbGeneratedMessage derives CanEqual {
5252
@transient @sharable
53-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
54-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
53+
private var __serializedSizeMemoized: _root_.scala.Int = 0
54+
private def __computeSerializedSize(): _root_.scala.Int = {
5555
var __size = 0
5656
if (sealedValue.privateAccess.isDefined) {
5757
val __value = sealedValue.privateAccess.get
@@ -379,8 +379,8 @@ final case class PrivateWithinAccess(
379379
symbol: _root_.scala.Predef.String = ""
380380
) extends dotty.tools.dotc.semanticdb.Access.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
381381
@transient @sharable
382-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
383-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
382+
private var __serializedSizeMemoized: _root_.scala.Int = 0
383+
private def __computeSerializedSize(): _root_.scala.Int = {
384384
var __size = 0
385385

386386
{
@@ -539,8 +539,8 @@ final case class ProtectedWithinAccess(
539539
symbol: _root_.scala.Predef.String = ""
540540
) extends dotty.tools.dotc.semanticdb.Access.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
541541
@transient @sharable
542-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
543-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
542+
private var __serializedSizeMemoized: _root_.scala.Int = 0
543+
private def __computeSerializedSize(): _root_.scala.Int = {
544544
var __size = 0
545545

546546
{

compiler/src/dotty/tools/dotc/semanticdb/generated/Annotation.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ final case class Annotation(
1313
tpe: dotty.tools.dotc.semanticdb.Type = dotty.tools.dotc.semanticdb.Annotation._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)
1414
) extends SemanticdbGeneratedMessage derives CanEqual {
1515
@transient @sharable
16-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
17-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
16+
private var __serializedSizeMemoized: _root_.scala.Int = 0
17+
private def __computeSerializedSize(): _root_.scala.Int = {
1818
var __size = 0
1919

2020
{

compiler/src/dotty/tools/dotc/semanticdb/generated/Constant.scala

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ final case class ConstantMessage(
5858
sealedValue: dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue = dotty.tools.dotc.semanticdb.ConstantMessage.SealedValue.Empty
5959
) extends SemanticdbGeneratedMessage derives CanEqual {
6060
@transient @sharable
61-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
62-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
61+
private var __serializedSizeMemoized: _root_.scala.Int = 0
62+
private def __computeSerializedSize(): _root_.scala.Int = {
6363
var __size = 0
6464
if (sealedValue.unitConstant.isDefined) {
6565
val __value = sealedValue.unitConstant.get
@@ -442,8 +442,8 @@ final case class BooleanConstant(
442442
value: _root_.scala.Boolean = false
443443
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
444444
@transient @sharable
445-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
446-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
445+
private var __serializedSizeMemoized: _root_.scala.Int = 0
446+
private def __computeSerializedSize(): _root_.scala.Int = {
447447
var __size = 0
448448

449449
{
@@ -520,8 +520,8 @@ final case class ByteConstant(
520520
value: _root_.scala.Int = 0
521521
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
522522
@transient @sharable
523-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
524-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
523+
private var __serializedSizeMemoized: _root_.scala.Int = 0
524+
private def __computeSerializedSize(): _root_.scala.Int = {
525525
var __size = 0
526526

527527
{
@@ -598,8 +598,8 @@ final case class ShortConstant(
598598
value: _root_.scala.Int = 0
599599
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
600600
@transient @sharable
601-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
602-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
601+
private var __serializedSizeMemoized: _root_.scala.Int = 0
602+
private def __computeSerializedSize(): _root_.scala.Int = {
603603
var __size = 0
604604

605605
{
@@ -676,8 +676,8 @@ final case class CharConstant(
676676
value: _root_.scala.Int = 0
677677
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
678678
@transient @sharable
679-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
680-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
679+
private var __serializedSizeMemoized: _root_.scala.Int = 0
680+
private def __computeSerializedSize(): _root_.scala.Int = {
681681
var __size = 0
682682

683683
{
@@ -754,8 +754,8 @@ final case class IntConstant(
754754
value: _root_.scala.Int = 0
755755
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
756756
@transient @sharable
757-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
758-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
757+
private var __serializedSizeMemoized: _root_.scala.Int = 0
758+
private def __computeSerializedSize(): _root_.scala.Int = {
759759
var __size = 0
760760

761761
{
@@ -832,8 +832,8 @@ final case class LongConstant(
832832
value: _root_.scala.Long = 0L
833833
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
834834
@transient @sharable
835-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
836-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
835+
private var __serializedSizeMemoized: _root_.scala.Int = 0
836+
private def __computeSerializedSize(): _root_.scala.Int = {
837837
var __size = 0
838838

839839
{
@@ -910,8 +910,8 @@ final case class FloatConstant(
910910
value: _root_.scala.Float = 0.0f
911911
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
912912
@transient @sharable
913-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
914-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
913+
private var __serializedSizeMemoized: _root_.scala.Int = 0
914+
private def __computeSerializedSize(): _root_.scala.Int = {
915915
var __size = 0
916916

917917
{
@@ -988,8 +988,8 @@ final case class DoubleConstant(
988988
value: _root_.scala.Double = 0.0
989989
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
990990
@transient @sharable
991-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
992-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
991+
private var __serializedSizeMemoized: _root_.scala.Int = 0
992+
private def __computeSerializedSize(): _root_.scala.Int = {
993993
var __size = 0
994994

995995
{
@@ -1066,8 +1066,8 @@ final case class StringConstant(
10661066
value: _root_.scala.Predef.String = ""
10671067
) extends dotty.tools.dotc.semanticdb.Constant.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
10681068
@transient @sharable
1069-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
1070-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
1069+
private var __serializedSizeMemoized: _root_.scala.Int = 0
1070+
private def __computeSerializedSize(): _root_.scala.Int = {
10711071
var __size = 0
10721072

10731073
{

compiler/src/dotty/tools/dotc/semanticdb/generated/Diagnostic.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ final case class Diagnostic(
1515
message: _root_.scala.Predef.String = ""
1616
) extends SemanticdbGeneratedMessage derives CanEqual {
1717
@transient @sharable
18-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
19-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
18+
private var __serializedSizeMemoized: _root_.scala.Int = 0
19+
private def __computeSerializedSize(): _root_.scala.Int = {
2020
var __size = 0
2121
if (range.isDefined) {
2222
val __value = range.get

compiler/src/dotty/tools/dotc/semanticdb/generated/Documentation.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ final case class Documentation(
1414
format: dotty.tools.dotc.semanticdb.Documentation.Format = dotty.tools.dotc.semanticdb.Documentation.Format.HTML
1515
) extends SemanticdbGeneratedMessage derives CanEqual {
1616
@transient @sharable
17-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
18-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
17+
private var __serializedSizeMemoized: _root_.scala.Int = 0
18+
private def __computeSerializedSize(): _root_.scala.Int = {
1919
var __size = 0
2020

2121
{

compiler/src/dotty/tools/dotc/semanticdb/generated/Location.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ final case class Location(
1414
range: _root_.scala.Option[dotty.tools.dotc.semanticdb.Range] = _root_.scala.None
1515
) extends SemanticdbGeneratedMessage derives CanEqual {
1616
@transient @sharable
17-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
18-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
17+
private var __serializedSizeMemoized: _root_.scala.Int = 0
18+
private def __computeSerializedSize(): _root_.scala.Int = {
1919
var __size = 0
2020

2121
{

compiler/src/dotty/tools/dotc/semanticdb/generated/Range.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ final case class Range(
1616
endCharacter: _root_.scala.Int = 0
1717
) extends SemanticdbGeneratedMessage derives CanEqual {
1818
@transient @sharable
19-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
20-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
19+
private var __serializedSizeMemoized: _root_.scala.Int = 0
20+
private def __computeSerializedSize(): _root_.scala.Int = {
2121
var __size = 0
2222

2323
{

compiler/src/dotty/tools/dotc/semanticdb/generated/Scope.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ final case class Scope(
1414
hardlinks: _root_.scala.Seq[dotty.tools.dotc.semanticdb.SymbolInformation] = _root_.scala.Seq.empty
1515
) extends SemanticdbGeneratedMessage derives CanEqual {
1616
@transient @sharable
17-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
18-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
17+
private var __serializedSizeMemoized: _root_.scala.Int = 0
18+
private def __computeSerializedSize(): _root_.scala.Int = {
1919
var __size = 0
2020
symlinks.foreach { __item =>
2121
val __value = __item

compiler/src/dotty/tools/dotc/semanticdb/generated/Signature.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ final case class SignatureMessage(
4444
sealedValue: dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue = dotty.tools.dotc.semanticdb.SignatureMessage.SealedValue.Empty
4545
) extends SemanticdbGeneratedMessage derives CanEqual {
4646
@transient @sharable
47-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
48-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
47+
private var __serializedSizeMemoized: _root_.scala.Int = 0
48+
private def __computeSerializedSize(): _root_.scala.Int = {
4949
var __size = 0
5050
if (sealedValue.classSignature.isDefined) {
5151
val __value = sealedValue.classSignature.get
@@ -222,8 +222,8 @@ final case class ClassSignature(
222222
declarations: _root_.scala.Option[dotty.tools.dotc.semanticdb.Scope] = _root_.scala.None
223223
) extends dotty.tools.dotc.semanticdb.Signature.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
224224
@transient @sharable
225-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
226-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
225+
private var __serializedSizeMemoized: _root_.scala.Int = 0
226+
private def __computeSerializedSize(): _root_.scala.Int = {
227227
var __size = 0
228228
if (typeParameters.isDefined) {
229229
val __value = typeParameters.get
@@ -372,8 +372,8 @@ final case class MethodSignature(
372372
returnType: dotty.tools.dotc.semanticdb.Type = dotty.tools.dotc.semanticdb.MethodSignature._typemapper_returnType.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)
373373
) extends dotty.tools.dotc.semanticdb.Signature.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
374374
@transient @sharable
375-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
376-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
375+
private var __serializedSizeMemoized: _root_.scala.Int = 0
376+
private def __computeSerializedSize(): _root_.scala.Int = {
377377
var __size = 0
378378
if (typeParameters.isDefined) {
379379
val __value = typeParameters.get
@@ -499,8 +499,8 @@ final case class TypeSignature(
499499
upperBound: dotty.tools.dotc.semanticdb.Type = dotty.tools.dotc.semanticdb.TypeSignature._typemapper_upperBound.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)
500500
) extends dotty.tools.dotc.semanticdb.Signature.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
501501
@transient @sharable
502-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
503-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
502+
private var __serializedSizeMemoized: _root_.scala.Int = 0
503+
private def __computeSerializedSize(): _root_.scala.Int = {
504504
var __size = 0
505505
if (typeParameters.isDefined) {
506506
val __value = typeParameters.get
@@ -628,8 +628,8 @@ final case class ValueSignature(
628628
tpe: dotty.tools.dotc.semanticdb.Type = dotty.tools.dotc.semanticdb.ValueSignature._typemapper_tpe.toCustom(dotty.tools.dotc.semanticdb.TypeMessage.defaultInstance)
629629
) extends dotty.tools.dotc.semanticdb.Signature.NonEmpty with SemanticdbGeneratedMessage derives CanEqual {
630630
@transient @sharable
631-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
632-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
631+
private var __serializedSizeMemoized: _root_.scala.Int = 0
632+
private def __computeSerializedSize(): _root_.scala.Int = {
633633
var __size = 0
634634

635635
{

compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolInformation.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ final case class SymbolInformation(
2222
documentation: _root_.scala.Option[dotty.tools.dotc.semanticdb.Documentation] = _root_.scala.None
2323
) extends SemanticdbGeneratedMessage derives CanEqual {
2424
@transient @sharable
25-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
26-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
25+
private var __serializedSizeMemoized: _root_.scala.Int = 0
26+
private def __computeSerializedSize(): _root_.scala.Int = {
2727
var __size = 0
2828

2929
{

compiler/src/dotty/tools/dotc/semanticdb/generated/SymbolOccurrence.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ final case class SymbolOccurrence(
1515
role: dotty.tools.dotc.semanticdb.SymbolOccurrence.Role = dotty.tools.dotc.semanticdb.SymbolOccurrence.Role.UNKNOWN_ROLE
1616
) extends SemanticdbGeneratedMessage derives CanEqual {
1717
@transient @sharable
18-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
19-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
18+
private var __serializedSizeMemoized: _root_.scala.Int = 0
19+
private def __computeSerializedSize(): _root_.scala.Int = {
2020
var __size = 0
2121
if (range.isDefined) {
2222
val __value = range.get

compiler/src/dotty/tools/dotc/semanticdb/generated/Synthetic.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ final case class Synthetic(
1414
tree: dotty.tools.dotc.semanticdb.Tree = dotty.tools.dotc.semanticdb.Synthetic._typemapper_tree.toCustom(dotty.tools.dotc.semanticdb.TreeMessage.defaultInstance)
1515
) extends SemanticdbGeneratedMessage derives CanEqual {
1616
@transient @sharable
17-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
18-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
17+
private var __serializedSizeMemoized: _root_.scala.Int = 0
18+
private def __computeSerializedSize(): _root_.scala.Int = {
1919
var __size = 0
2020
if (range.isDefined) {
2121
val __value = range.get

compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocument.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ final case class TextDocument(
2121
synthetics: _root_.scala.Seq[dotty.tools.dotc.semanticdb.Synthetic] = _root_.scala.Seq.empty
2222
) extends SemanticdbGeneratedMessage derives CanEqual {
2323
@transient @sharable
24-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
25-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
24+
private var __serializedSizeMemoized: _root_.scala.Int = 0
25+
private def __computeSerializedSize(): _root_.scala.Int = {
2626
var __size = 0
2727

2828
{

compiler/src/dotty/tools/dotc/semanticdb/generated/TextDocuments.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ final case class TextDocuments(
1313
documents: _root_.scala.Seq[dotty.tools.dotc.semanticdb.TextDocument] = _root_.scala.Seq.empty
1414
) extends SemanticdbGeneratedMessage derives CanEqual {
1515
@transient @sharable
16-
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
17-
private[this] def __computeSerializedSize(): _root_.scala.Int = {
16+
private var __serializedSizeMemoized: _root_.scala.Int = 0
17+
private def __computeSerializedSize(): _root_.scala.Int = {
1818
var __size = 0
1919
documents.foreach { __item =>
2020
val __value = __item

0 commit comments

Comments
 (0)