Skip to content

Commit 5576fed

Browse files
committed
Update scala settings
1 parent 97313ed commit 5576fed

File tree

111 files changed

+269
-175
lines changed

Some content is hidden

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

111 files changed

+269
-175
lines changed

Test.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@main def hello = println("Hello, world!")

compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ trait BCodeHelpers extends BCodeIdiomatic {
823823
// without it. This is particularly bad because the availability of
824824
// generic information could disappear as a consequence of a seemingly
825825
// unrelated change.
826-
ctx.base.settings.YnoGenericSig.value
826+
ctx.base.settings.XnoGenericSig.value
827827
|| sym.is(Artifact)
828828
|| sym.isAllOf(LiftedMethod)
829829
|| sym.is(Bridge)

compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ object PostProcessorFrontendAccess {
121121
case (None, None) => "8" // least supported version by default
122122

123123
override val debug: Boolean = ctx.debug
124-
override val dumpClassesDirectory: Option[String] = s.Ydumpclasses.valueSetByUser
124+
override val dumpClassesDirectory: Option[String] = s.Xdumpclasses.valueSetByUser
125125
override val outputDirectory: AbstractFile = s.outputDir.value
126126
override val mainClass: Option[String] = s.XmainClass.valueSetByUser
127-
override val jarCompressionLevel: Int = s.YjarCompressionLevel.value
127+
override val jarCompressionLevel: Int = s.XjarCompressionLevel.value
128128
override val backendParallelism: Int = s.YbackendParallelism.value
129129
override val backendMaxWorkerQueue: Option[Int] = s.YbackendWorkerQueue.valueSetByUser
130130
override val outputOnlyTasty: Boolean = s.YoutputOnlyTasty.value

compiler/src/dotty/tools/dotc/Driver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Driver {
8282
Positioned.init(using ictx)
8383

8484
inContext(ictx) {
85-
if !ctx.settings.YdropComments.value || ctx.settings.YreadComments.value then
85+
if !ctx.settings.XdropComments.value || ctx.settings.XreadComments.value then
8686
ictx.setProperty(ContextDoc, new ContextDocstrings)
8787
val fileNamesOrNone = command.checkUsage(summary, sourcesRequired)(using ctx.settings)(using ctx.settingsState)
8888
fileNamesOrNone.map { fileNames =>

compiler/src/dotty/tools/dotc/config/ScalaSettings.scala

Lines changed: 44 additions & 19 deletions
Large diffs are not rendered by default.

compiler/src/dotty/tools/dotc/config/Settings.scala

Lines changed: 74 additions & 59 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,15 +349,15 @@ object Phases {
349349
def subPhases: List[Run.SubPhase] = Nil
350350
final def traversals: Int = if subPhases.isEmpty then 1 else subPhases.length
351351

352-
/** skip the phase for a Java compilation unit, may depend on -Yjava-tasty */
352+
/** skip the phase for a Java compilation unit, may depend on -Xjava-tasty */
353353
def skipIfJava(using Context): Boolean = true
354354

355355
final def isAfterLastJavaPhase(using Context): Boolean =
356-
// With `-Yjava-tasty` nominally the final phase is expected be ExtractAPI,
356+
// With `-Xjava-tasty` nominally the final phase is expected be ExtractAPI,
357357
// otherwise drop Java sources at the end of TyperPhase.
358358
// Checks if the last Java phase is before this phase,
359359
// which always fails if the terminal phase is before lastJavaPhase.
360-
val lastJavaPhase = if ctx.settings.YjavaTasty.value then sbtExtractAPIPhase else typerPhase
360+
val lastJavaPhase = if ctx.settings.XjavaTasty.value then sbtExtractAPIPhase else typerPhase
361361
lastJavaPhase <= this
362362

363363
/** @pre `isRunnable` returns true */

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ object SymbolLoaders {
7979
// offer a setting to resolve the conflict one way or the other.
8080
// This was motivated by the desire to use YourKit probes, which
8181
// require yjp.jar at runtime. See SI-2089.
82-
if (ctx.settings.YtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
82+
if (ctx.settings.XtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
8383
report.warning(
8484
s"Resolving package/object name conflict in favor of package ${preExisting.fullName}. The object will be inaccessible.")
8585
owner.asClass.delete(preExisting)
8686
}
87-
else if (ctx.settings.YtermConflict.value == "object") {
87+
else if (ctx.settings.XtermConflict.value == "object") {
8888
report.warning(
8989
s"Resolving package/object name conflict in favor of object ${preExisting.fullName}. The package will be inaccessible.")
9090
return NoSymbol
@@ -457,7 +457,7 @@ class TastyLoader(val tastyFile: AbstractFile) extends SymbolLoader {
457457
new ClassfileTastyUUIDParser(classfile)(ctx).checkTastyUUID(tastyUUID)
458458
else
459459
// This will be the case in any of our tests that compile with `-Youtput-only-tasty`, or when
460-
// tasty file compiled by `-Yearly-tasty-output-write` comes from an early output jar.
460+
// tasty file compiled by `-Xearly-tasty-output-write` comes from an early output jar.
461461
report.inform(s"No classfiles found for $tastyFile when checking TASTy UUID")
462462

463463
private def mayLoadTreesFromTasty(using Context): Boolean =

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ extends TypeError:
101101
em"""Recursion limit exceeded.
102102
|Maybe there is an illegal cyclic reference?
103103
|If that's not the case, you could also try to increase the stacksize using the -Xss JVM option.
104-
|For the unprocessed stack trace, compile with -Yno-decode-stacktraces.
104+
|For the unprocessed stack trace, compile with -Xno-decode-stacktraces.
105105
|A recurring operation is (inner to outer):
106106
|${opsString(mostCommon).stripMargin}"""
107107

@@ -121,7 +121,7 @@ object handleRecursive:
121121
e
122122

123123
def apply(op: String, details: => String, exc: Throwable, weight: Int = 1)(using Context): Nothing =
124-
if ctx.settings.YnoDecodeStacktraces.value then
124+
if ctx.settings.XnoDecodeStacktraces.value then
125125
throw exc
126126
else exc match
127127
case _: RecursionOverflow =>

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
358358
}
359359
catch
360360
case ex: Throwable =>
361-
if !ctx.settings.YnoDecodeStacktraces.value
361+
if !ctx.settings.XnoDecodeStacktraces.value
362362
&& handleRecursive.underlyingStackOverflowOrNull(ex) != null then
363363
throw StackSizeExceeded(mdef)
364364
else
@@ -866,7 +866,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
866866
em"""Recursion limit exceeded while pickling ${ex.mdef}
867867
|in ${ex.mdef.symbol.showLocated}.
868868
|You could try to increase the stacksize using the -Xss JVM option.
869-
|For the unprocessed stack trace, compile with -Yno-decode-stacktraces.""",
869+
|For the unprocessed stack trace, compile with -Xno-decode-stacktraces.""",
870870
ex.mdef.srcPos)
871871

872872
def missing = forwardSymRefs.keysIterator

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,8 @@ class TreeUnpickler(reader: TastyReader,
981981
if !sym.isType && !sym.is(ParamAccessor) then
982982
sym.info = ta.avoidPrivateLeaks(sym)
983983

984-
if (ctx.settings.YreadComments.value) {
985-
assert(ctx.docCtx.isDefined, "`-Yread-docs` enabled, but no `docCtx` is set.")
984+
if (ctx.settings.XreadComments.value) {
985+
assert(ctx.docCtx.isDefined, "`-Xread-docs` enabled, but no `docCtx` is set.")
986986
commentUnpicklerOpt.foreach { commentUnpickler =>
987987
val comment = commentUnpickler.commentAt(start)
988988
ctx.docCtx.get.addDocstring(tree.symbol, comment)

compiler/src/dotty/tools/dotc/decompiler/IDEDecompilerDriver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class IDEDecompilerDriver(val settings: List[String]) extends dotc.Driver {
1919

2020
private val myInitCtx: Context = {
2121
val rootCtx = initCtx.fresh.addMode(Mode.Interactive | Mode.ReadPositions)
22-
rootCtx.setSetting(rootCtx.settings.YreadComments, true)
22+
rootCtx.setSetting(rootCtx.settings.XreadComments, true)
2323
rootCtx.setSetting(rootCtx.settings.YretainTrees, true)
2424
rootCtx.setSetting(rootCtx.settings.fromTasty, true)
2525
val ctx = setup(settings.toArray :+ "dummy.scala", rootCtx).get._2

compiler/src/dotty/tools/dotc/fromtasty/ReadTasty.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ class ReadTasty extends Phase {
4848
if (cls.rootTree.isEmpty) None
4949
else {
5050
val attributes = unpickler.tastyAttributes
51-
if attributes.isJava && !ctx.settings.YjavaTasty.value then
52-
// filter out Java compilation units if -Yjava-tasty is not set
51+
if attributes.isJava && !ctx.settings.XjavaTasty.value then
52+
// filter out Java compilation units if -Xjava-tasty is not set
5353
None
54-
else if attributes.isOutline && !ctx.settings.YallowOutlineFromTasty.value then
55-
cannotUnpickle("it contains outline signatures and -Yallow-outline-from-tasty is not set.")
54+
else if attributes.isOutline && !ctx.settings.XallowOutlineFromTasty.value then
55+
cannotUnpickle("it contains outline signatures and -Xallow-outline-from-tasty is not set.")
5656
else
5757
val unit = CompilationUnit(cls, cls.rootTree, forceTrees = true)
5858
unit.pickled += (cls -> (() => unpickler.unpickler.bytes))

compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class InteractiveDriver(val settings: List[String]) extends Driver {
3333
private val myInitCtx: Context = {
3434
val rootCtx = initCtx.fresh.addMode(Mode.ReadPositions).addMode(Mode.Interactive)
3535
rootCtx.setSetting(rootCtx.settings.YretainTrees, true)
36-
rootCtx.setSetting(rootCtx.settings.YcookComments, true)
37-
rootCtx.setSetting(rootCtx.settings.YreadComments, true)
36+
rootCtx.setSetting(rootCtx.settings.XcookComments, true)
37+
rootCtx.setSetting(rootCtx.settings.XreadComments, true)
3838
val ctx = setup(settings.toArray, rootCtx) match
3939
case Some((_, ctx)) => ctx
4040
case None => rootCtx

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ object Parsers {
16141614
imods &~= Given
16151615
syntaxError(em"context function types require at least one parameter", paramSpan)
16161616
FunctionWithMods(params, resultType, imods, erasedArgs.toList)
1617-
else if !ctx.settings.YkindProjector.isDefault then
1617+
else if !ctx.settings.XkindProjector.isDefault then
16181618
val (newParams :+ newResultType, tparams) = replaceKindProjectorPlaceholders(params :+ resultType): @unchecked
16191619
lambdaAbstract(tparams, Function(newParams, newResultType))
16201620
else
@@ -1741,7 +1741,7 @@ object Parsers {
17411741
val isVarianceAnnotated = name.startsWith("+") || name.startsWith("-")
17421742
// We remove the variance marker from the name without passing along the specified variance at all
17431743
// The real variance will be inferred at a later stage but may contradict the variance specified,
1744-
// This is ok, because `-Ykind-projector` is for cross-compiling existing Scala 2 code, not for writing new code,
1744+
// This is ok, because `-Xkind-projector` is for cross-compiling existing Scala 2 code, not for writing new code,
17451745
// we may assume that variance annotations have already been checked by the Scala 2 compiler.
17461746
val unannotatedName = if (isVarianceAnnotated) name.mapLast(_.drop(1)) else name
17471747
TypeDef(unannotatedName, WildcardTypeBoundsTree()).withFlags(Param)
@@ -1758,7 +1758,7 @@ object Parsers {
17581758
Ident(name)
17591759
}
17601760

1761-
val uscores = ctx.settings.YkindProjector.value == "underscores"
1761+
val uscores = ctx.settings.XkindProjector.value == "underscores"
17621762
val newParams = params.mapConserve {
17631763
case param @ Ident(tpnme.raw.STAR | tpnme.raw.MINUS_STAR | tpnme.raw.PLUS_STAR) => addParam()
17641764
case param @ Ident(tpnme.USCOREkw | tpnme.raw.MINUS_USCORE | tpnme.raw.PLUS_USCORE) if uscores => addParam()
@@ -1944,7 +1944,7 @@ object Parsers {
19441944
if isSimpleLiteral then
19451945
SingletonTypeTree(simpleLiteral())
19461946
else if in.token == USCORE then
1947-
if ctx.settings.YkindProjector.value == "underscores" then
1947+
if ctx.settings.XkindProjector.value == "underscores" then
19481948
val start = in.skipToken()
19491949
Ident(tpnme.USCOREkw).withSpan(Span(start, in.lastOffset, start))
19501950
else
@@ -1960,7 +1960,7 @@ object Parsers {
19601960
typeBounds().withSpan(Span(start, in.lastOffset, start))
19611961
// Allow symbols -_ and +_ through for compatibility with code written using kind-projector in Scala 3 underscore mode.
19621962
// While these signify variant type parameters in Scala 2 + kind-projector, we ignore their variance markers since variance is inferred.
1963-
else if (isIdent(nme.MINUS) || isIdent(nme.PLUS)) && in.lookahead.token == USCORE && ctx.settings.YkindProjector.value == "underscores" then
1963+
else if (isIdent(nme.MINUS) || isIdent(nme.PLUS)) && in.lookahead.token == USCORE && ctx.settings.XkindProjector.value == "underscores" then
19641964
val identName = in.name.toTypeName ++ nme.USCOREkw
19651965
val start = in.skipToken()
19661966
in.nextToken()
@@ -2012,7 +2012,7 @@ object Parsers {
20122012
val applied = rejectWildcardType(t)
20132013
val args = typeArgs(namedOK = false, wildOK = true)
20142014

2015-
if (!ctx.settings.YkindProjector.isDefault) {
2015+
if (!ctx.settings.XkindProjector.isDefault) {
20162016
def fail(): Tree = {
20172017
syntaxError(
20182018
em"λ requires a single argument of the form X => ... or (X, Y) => ...",
@@ -2044,7 +2044,7 @@ object Parsers {
20442044
}
20452045
})
20462046
case _ =>
2047-
if (!ctx.settings.YkindProjector.isDefault) {
2047+
if (!ctx.settings.XkindProjector.isDefault) {
20482048
t match {
20492049
case Tuple(params) =>
20502050
val (newParams, tparams) = replaceKindProjectorPlaceholders(params)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ object Scanners {
174174
}
175175

176176
class Scanner(source: SourceFile, override val startFrom: Offset = 0, profile: Profile = NoProfile, allowIndent: Boolean = true)(using Context) extends ScannerCommon(source) {
177-
val keepComments = !ctx.settings.YdropComments.value
177+
val keepComments = !ctx.settings.XdropComments.value
178178

179179
/** A switch whether operators at the start of lines can be infix operators */
180180
private[Scanners] var allowLeadingInfixOperators = true

compiler/src/dotty/tools/dotc/report.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ object report:
130130

131131
// Should only be called from Run#enrichErrorMessage.
132132
def enrichErrorMessage(errorMessage: String)(using Context): String =
133-
if ctx.settings.YnoEnrichErrorMessages.value then errorMessage
133+
if ctx.settings.XnoEnrichErrorMessages.value then errorMessage
134134
else try enrichErrorMessage1(errorMessage)
135135
catch case _: Throwable => errorMessage // don't introduce new errors trying to report errors, so swallow exceptions
136136

@@ -155,7 +155,7 @@ object report:
155155
| An unhandled exception was thrown in the compiler.
156156
| Please file a crash report here:
157157
| https://github.com/scala/scala3/issues/new/choose
158-
| For non-enriched exceptions, compile with -Yno-enrich-error-messages.
158+
| For non-enriched exceptions, compile with -Xno-enrich-error-messages.
159159
|
160160
|$info1
161161
|""".stripMargin

compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class ExtractAPI extends Phase {
5252
override def description: String = ExtractAPI.description
5353

5454
override def isRunnable(using Context): Boolean = {
55-
super.isRunnable && (ctx.runZincPhases || ctx.settings.YjavaTasty.value)
55+
super.isRunnable && (ctx.runZincPhases || ctx.settings.XjavaTasty.value)
5656
}
5757

5858
// Check no needed. Does not transform trees
5959
override def isCheckable: Boolean = false
6060

61-
// when `-Yjava-tasty` is set we actually want to run this phase on Java sources
61+
// when `-Xjava-tasty` is set we actually want to run this phase on Java sources
6262
override def skipIfJava(using Context): Boolean = false
6363

6464
// SuperAccessors need to be part of the API (see the scripted test
@@ -70,7 +70,7 @@ class ExtractAPI extends Phase {
7070

7171
override def runOn(units: List[CompilationUnit])(using Context): List[CompilationUnit] =
7272
val doZincCallback = ctx.runZincPhases
73-
val sigWriter: Option[Pickler.EarlyFileWriter] = ctx.settings.YearlyTastyOutput.value match
73+
val sigWriter: Option[Pickler.EarlyFileWriter] = ctx.settings.XearlyTastyOutput.value match
7474
case earlyOut if earlyOut.isDirectory && earlyOut.exists =>
7575
Some(Pickler.EarlyFileWriter(earlyOut))
7676
case _ =>
@@ -81,12 +81,12 @@ class ExtractAPI extends Phase {
8181
val ctx0 = ctx.withProperty(NonLocalClassSymbolsInCurrentUnits, Some(nonLocalClassSymbols))
8282
super.runOn(units)(using ctx0)
8383
else
84-
units // still run the phase for the side effects (writing TASTy files to -Yearly-tasty-output)
84+
units // still run the phase for the side effects (writing TASTy files to -Xearly-tasty-output)
8585
sigWriter.foreach(writeSigFiles(units0, _))
8686
if doZincCallback then
8787
ctx.withIncCallback(recordNonLocalClasses(nonLocalClassSymbols, _))
88-
if ctx.settings.YjavaTasty.value then
89-
units0.filterNot(_.typedAsJava) // remove java sources, this is the terminal phase when `-Yjava-tasty` is set
88+
if ctx.settings.XjavaTasty.value then
89+
units0.filterNot(_.typedAsJava) // remove java sources, this is the terminal phase when `-Xjava-tasty` is set
9090
else
9191
units0
9292
end runOn

compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ExtractDependencies extends Phase {
6464
// Check no needed. Does not transform trees
6565
override def isCheckable: Boolean = false
6666

67-
// when `-Yjava-tasty` is set we actually want to run this phase on Java sources
67+
// when `-Xjava-tasty` is set we actually want to run this phase on Java sources
6868
override def skipIfJava(using Context): Boolean = false
6969

7070
// This phase should be run directly after `Frontend`, if it is run after

compiler/src/dotty/tools/dotc/transform/CookComments.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CookComments extends MegaPhase.MiniPhase {
1212
override def description: String = CookComments.description
1313

1414
override def transformTypeDef(tree: tpd.TypeDef)(using Context): tpd.Tree = {
15-
if (ctx.settings.YcookComments.value && tree.isClassDef) {
15+
if (ctx.settings.XcookComments.value && tree.isClassDef) {
1616
val cls = tree.symbol
1717
val cookingCtx = ctx.localContext(tree, cls).setNewScope
1818
val template = tree.rhs.asInstanceOf[tpd.Template]

compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ object GenericSignatures {
445445
}
446446
}
447447

448-
private def needsJavaSig(tp: Type, throwsArgs: List[Type])(using Context): Boolean = !ctx.settings.YnoGenericSig.value && {
448+
private def needsJavaSig(tp: Type, throwsArgs: List[Type])(using Context): Boolean = !ctx.settings.XnoGenericSig.value && {
449449
def needs(tp: Type) = (new NeedsSigCollector).apply(false, tp)
450450
needs(tp) || throwsArgs.exists(needs)
451451
}

compiler/src/dotty/tools/dotc/transform/Pickler.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Pickler extends Phase {
5858
override def isRunnable(using Context): Boolean =
5959
super.isRunnable && !ctx.settings.fromTasty.value
6060

61-
// when `-Yjava-tasty` is set we actually want to run this phase on Java sources
61+
// when `-Xjava-tasty` is set we actually want to run this phase on Java sources
6262
override def skipIfJava(using Context): Boolean = false
6363

6464
private def output(name: String, msg: String) = {
@@ -116,8 +116,8 @@ class Pickler extends Phase {
116116
util.SourceFile.relativePath(unit.source, reference)
117117
val isJavaAttr = unit.isJava // we must always set JAVAattr when pickling Java sources
118118
if isJavaAttr then
119-
// assert that Java sources didn't reach Pickler without `-Yjava-tasty`.
120-
assert(ctx.settings.YjavaTasty.value, "unexpected Java source file without -Yjava-tasty")
119+
// assert that Java sources didn't reach Pickler without `-Xjava-tasty`.
120+
assert(ctx.settings.XjavaTasty.value, "unexpected Java source file without -Xjava-tasty")
121121
val isOutline = isJavaAttr // TODO: later we may want outline for Scala sources too
122122
val attributes = Attributes(
123123
sourceFile = sourceRelativePath,
@@ -147,7 +147,7 @@ class Pickler extends Phase {
147147
unit.source, tree :: Nil, positionWarnings,
148148
scratch.positionBuffer, scratch.pickledIndices)
149149

150-
if !ctx.settings.YdropComments.value then
150+
if !ctx.settings.XdropComments.value then
151151
CommentPickler.pickleComments(
152152
pickler, treePkl.buf.addrOfTree, treePkl.docString, tree,
153153
scratch.commentBuffer)
@@ -203,7 +203,7 @@ class Pickler extends Phase {
203203
super.runOn(units)
204204
if ctx.settings.YtestPickler.value then
205205
val ctx2 = ctx.fresh
206-
.setSetting(ctx.settings.YreadComments, true)
206+
.setSetting(ctx.settings.XreadComments, true)
207207
.setSetting(ctx.settings.YshowPrintErrors, true)
208208
testUnpickler(
209209
using ctx2

compiler/src/dotty/tools/dotc/typer/TyperPhase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
5959
}
6060

6161
protected def discardAfterTyper(unit: CompilationUnit)(using Context): Boolean =
62-
(unit.isJava && !ctx.settings.YjavaTasty.value) || unit.suspended
62+
(unit.isJava && !ctx.settings.XjavaTasty.value) || unit.suspended
6363

6464
override val subPhases: List[SubPhase] = List(
6565
SubPhase("indexing"), SubPhase("typechecking"), SubPhase("checkingJava"))

0 commit comments

Comments
 (0)