Skip to content

Commit d00c7e9

Browse files
committed
Update scala settings
1 parent 05114dd commit d00c7e9

File tree

110 files changed

+266
-172
lines changed

Some content is hidden

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

110 files changed

+266
-172
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
@@ -85,7 +85,7 @@ class Driver {
8585
Positioned.init(using ictx)
8686

8787
inContext(ictx) {
88-
if !ctx.settings.YdropComments.value || ctx.settings.YreadComments.value then
88+
if !ctx.settings.XdropComments.value || ctx.settings.XreadComments.value then
8989
ictx.setProperty(ContextDoc, new ContextDocstrings)
9090
val fileNamesOrNone = command.checkUsage(summary, sourcesRequired)(using ctx.settings)(using ctx.settingsState)
9191
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
@@ -80,12 +80,12 @@ object SymbolLoaders {
8080
// offer a setting to resolve the conflict one way or the other.
8181
// This was motivated by the desire to use YourKit probes, which
8282
// require yjp.jar at runtime. See SI-2089.
83-
if (ctx.settings.YtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
83+
if (ctx.settings.XtermConflict.value == "package" || ctx.mode.is(Mode.Interactive)) {
8484
report.warning(
8585
s"Resolving package/object name conflict in favor of package ${preExisting.fullName}. The object will be inaccessible.")
8686
owner.asClass.delete(preExisting)
8787
}
88-
else if (ctx.settings.YtermConflict.value == "object") {
88+
else if (ctx.settings.XtermConflict.value == "object") {
8989
report.warning(
9090
s"Resolving package/object name conflict in favor of object ${preExisting.fullName}. The package will be inaccessible.")
9191
return NoSymbol
@@ -470,7 +470,7 @@ class TastyLoader(val tastyFile: AbstractFile) extends SymbolLoader {
470470
new ClassfileTastyUUIDParser(classfile)(ctx).checkTastyUUID(tastyUUID)
471471
else
472472
// This will be the case in any of our tests that compile with `-Youtput-only-tasty`, or when
473-
// tasty file compiled by `-Yearly-tasty-output-write` comes from an early output jar.
473+
// tasty file compiled by `-Xearly-tasty-output-write` comes from an early output jar.
474474
report.inform(s"No classfiles found for $tastyFile when checking TASTy UUID")
475475

476476
private def checkBeTastyUUID(tastyFile: AbstractFile, tastyBytes: Array[Byte])(using Context): Unit =

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

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

@@ -122,7 +122,7 @@ object handleRecursive:
122122
e
123123

124124
def apply(op: String, details: => String, exc: Throwable, weight: Int = 1)(using Context): Nothing =
125-
if ctx.settings.YnoDecodeStacktraces.value then
125+
if ctx.settings.XnoDecodeStacktraces.value then
126126
throw exc
127127
else exc match
128128
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
@@ -385,7 +385,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
385385
}
386386
catch
387387
case ex: Throwable =>
388-
if !ctx.settings.YnoDecodeStacktraces.value
388+
if !ctx.settings.XnoDecodeStacktraces.value
389389
&& handleRecursive.underlyingStackOverflowOrNull(ex) != null then
390390
throw StackSizeExceeded(mdef)
391391
else
@@ -912,7 +912,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
912912
em"""Recursion limit exceeded while pickling ${ex.mdef}
913913
|in ${ex.mdef.symbol.showLocated}.
914914
|You could try to increase the stacksize using the -Xss JVM option.
915-
|For the unprocessed stack trace, compile with -Yno-decode-stacktraces.""",
915+
|For the unprocessed stack trace, compile with -Xno-decode-stacktraces.""",
916916
ex.mdef.srcPos)
917917

918918
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
@@ -991,8 +991,8 @@ class TreeUnpickler(reader: TastyReader,
991991
if !sym.isType && !sym.is(ParamAccessor) then
992992
sym.info = ta.avoidPrivateLeaks(sym)
993993

994-
if (ctx.settings.YreadComments.value) {
995-
assert(ctx.docCtx.isDefined, "`-Yread-docs` enabled, but no `docCtx` is set.")
994+
if (ctx.settings.XreadComments.value) {
995+
assert(ctx.docCtx.isDefined, "`-Xread-docs` enabled, but no `docCtx` is set.")
996996
commentUnpicklerOpt.foreach { commentUnpickler =>
997997
val comment = commentUnpickler.commentAt(start)
998998
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
@@ -146,7 +146,7 @@ object report:
146146

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

@@ -171,7 +171,7 @@ object report:
171171
| An unhandled exception was thrown in the compiler.
172172
| Please file a crash report here:
173173
| https://github.com/scala/scala3/issues/new/choose
174-
| For non-enriched exceptions, compile with -Yno-enrich-error-messages.
174+
| For non-enriched exceptions, compile with -Xno-enrich-error-messages.
175175
|
176176
|$info1
177177
|""".stripMargin

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

Lines changed: 4 additions & 4 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
@@ -79,8 +79,8 @@ class ExtractAPI extends Phase {
7979
units // still run the phase for the side effects (writing TASTy files to -Yearly-tasty-output)
8080
if doZincCallback then
8181
ctx.withIncCallback(recordNonLocalClasses(nonLocalClassSymbols, _))
82-
if ctx.settings.YjavaTasty.value then
83-
units0.filterNot(_.typedAsJava) // remove java sources, this is the terminal phase when `-Yjava-tasty` is set
82+
if ctx.settings.XjavaTasty.value then
83+
units0.filterNot(_.typedAsJava) // remove java sources, this is the terminal phase when `-Xjava-tasty` is set
8484
else
8585
units0
8686
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
@@ -198,7 +198,7 @@ class Pickler extends Phase {
198198
// we do not want to pickle `.betasty` if do not plan to actually create the
199199
// betasty file (as signified by the -Ybest-effort option)
200200

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

204204
private def output(name: String, msg: String) = {
@@ -286,8 +286,8 @@ class Pickler extends Phase {
286286
util.SourceFile.relativePath(unit.source, reference)
287287
val isJavaAttr = unit.isJava // we must always set JAVAattr when pickling Java sources
288288
if isJavaAttr then
289-
// assert that Java sources didn't reach Pickler without `-Yjava-tasty`.
290-
assert(ctx.settings.YjavaTasty.value, "unexpected Java source file without -Yjava-tasty")
289+
// assert that Java sources didn't reach Pickler without `-Xjava-tasty`.
290+
assert(ctx.settings.XjavaTasty.value, "unexpected Java source file without -Xjava-tasty")
291291
val isOutline = isJavaAttr // TODO: later we may want outline for Scala sources too
292292
val attributes = Attributes(
293293
sourceFile = sourceRelativePath,
@@ -326,7 +326,7 @@ class Pickler extends Phase {
326326
unit.source, tree :: Nil, positionWarnings,
327327
scratch.positionBuffer, scratch.pickledIndices)
328328

329-
if !ctx.settings.YdropComments.value then
329+
if !ctx.settings.XdropComments.value then
330330
CommentPickler.pickleComments(
331331
pickler, treePkl.buf.addrOfTree, treePkl.docString, tree,
332332
scratch.commentBuffer)
@@ -403,7 +403,7 @@ class Pickler extends Phase {
403403
runPhase(_())
404404
if ctx.settings.YtestPickler.value then
405405
val ctx2 = ctx.fresh
406-
.setSetting(ctx.settings.YreadComments, true)
406+
.setSetting(ctx.settings.XreadComments, true)
407407
.setSetting(ctx.settings.YshowPrintErrors, true)
408408
testUnpickler(
409409
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"))

compiler/src/dotty/tools/repl/ReplDriver.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class ReplDriver(settings: Array[String],
8282
/** Create a fresh and initialized context with IDE mode enabled */
8383
private def initialCtx(settings: List[String]) = {
8484
val rootCtx = initCtx.fresh.addMode(Mode.ReadPositions | Mode.Interactive)
85-
rootCtx.setSetting(rootCtx.settings.YcookComments, true)
86-
rootCtx.setSetting(rootCtx.settings.YreadComments, true)
85+
rootCtx.setSetting(rootCtx.settings.XcookComments, true)
86+
rootCtx.setSetting(rootCtx.settings.XreadComments, true)
8787
setupRootCtx(this.settings ++ settings, rootCtx)
8888
}
8989

0 commit comments

Comments
 (0)