diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index e1960f3122f3..3fe6ea4de819 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -402,14 +402,14 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma else Some(ctx.settings.Ydumpclasses.value) def mainClass: Option[String] = - if (ctx.settings.mainClass.isDefault) None - else Some(ctx.settings.mainClass.value) - def setMainClass(name: String): Unit = ctx.settings.mainClass.update(name) + if (ctx.settings.XmainClass.isDefault) None + else Some(ctx.settings.XmainClass.value) + def setMainClass(name: String): Unit = ctx.settings.XmainClass.update(name) - def noForwarders: Boolean = ctx.settings.noForwarders.value + def noForwarders: Boolean = ctx.settings.XnoForwarders.value def debuglevel: Int = 3 // 0 -> no debug info; 1-> filename; 2-> lines; 3-> varnames - def settings_debug: Boolean = ctx.settings.debug.value + def settings_debug: Boolean = ctx.settings.Ydebug.value def targetPlatform: String = ctx.settings.target.value val perRunCaches: Caches = new Caches { diff --git a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala index b627f001549e..4ce9926eb3b8 100644 --- a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala +++ b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala @@ -225,7 +225,7 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter for (binary <- ctx.compilationUnit.pickled.get(claszSymbol.asClass)) { val store = if (mirrorC ne null) mirrorC else plainC val tasty = - if (ctx.settings.emitTasty.value) { + if (ctx.settings.YemitTasty.value) { val outTastyFile = getFileForClassfile(outF, store.name, ".tasty") val outstream = new DataOutputStream(outTastyFile.bufferedOutput) try outstream.write(binary) diff --git a/compiler/src/dotty/tools/dotc/Bench.scala b/compiler/src/dotty/tools/dotc/Bench.scala index 836a575b6faf..927b638f77dc 100644 --- a/compiler/src/dotty/tools/dotc/Bench.scala +++ b/compiler/src/dotty/tools/dotc/Bench.scala @@ -20,7 +20,7 @@ object Bench extends Driver { val start = System.nanoTime() val r = super.doCompile(compiler, fileNames) println(s"time elapsed: ${(System.nanoTime - start) / 1000000}ms") - if (ctx.settings.prompt.value) { + if (ctx.settings.Xprompt.value) { print("hit to continue >") System.in.read() println() diff --git a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala index 9903c6d75519..e4f3137458ef 100644 --- a/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -51,35 +51,35 @@ class ScalaSettings extends Settings.SettingGroup { /** -X "Advanced" settings */ val Xhelp = BooleanSetting("-X", "Print a synopsis of advanced options.") - val noForwarders = BooleanSetting("-Xno-forwarders", "Do not generate static forwarders in mirror classes.") + val XnoForwarders = BooleanSetting("-Xno-forwarders", "Do not generate static forwarders in mirror classes.") val XminImplicitSearchDepth = IntSetting("-Xmin-implicit-search-depth", "Set number of levels of implicit searches undertaken before checking for divergence.", 5) val xmaxInlines = IntSetting("-Xmax-inlines", "Maximal number of successive inlines", 32) - val maxClassfileName = IntSetting("-Xmax-classfile-name", "Maximum filename length for generated classes", 255, 72 to 255) + val XmaxClassfileName = IntSetting("-Xmax-classfile-name", "Maximum filename length for generated classes", 255, 72 to 255) val Xmigration = VersionSetting("-Xmigration", "Warn about constructs whose behavior may have changed since version.") val Xprint = PhasesSetting("-Xprint", "Print out program after") - val printtypes = BooleanSetting("-Xprint-types", "Print tree types (debugging option).") + val XprintTypes = BooleanSetting("-Xprint-types", "Print tree types (debugging option).") val XprintDiff = BooleanSetting("-Xprint-diff", "Print changed parts of the tree since last print.") val XprintDiffDel = BooleanSetting("-Xprint-diff-del", "Print chaged parts of the tree since last print including deleted parts.") - val prompt = BooleanSetting("-Xprompt", "Display a prompt after each error (debugging option).") - val mainClass = StringSetting("-Xmain-class", "path", "Class for manifest's Main-Class entry (only useful with -d )", "") + val Xprompt = BooleanSetting("-Xprompt", "Display a prompt after each error (debugging option).") + val XmainClass = StringSetting("-Xmain-class", "path", "Class for manifest's Main-Class entry (only useful with -d )", "") val XnoValueClasses = BooleanSetting("-Xno-value-classes", "Do not use value classes. Helps debugging.") val XreplLineWidth = IntSetting("-Xrepl-line-width", "Maximial number of columns per line for REPL output", 390) val XfatalWarnings = BooleanSetting("-Xfatal-warnings", "Fail the compilation if there are any warnings.") val XverifySignatures = BooleanSetting("-Xverify-signatures", "Verify generic signatures in generated bytecode.") /** -Y "Private" settings */ - val overrideVars = BooleanSetting("-Yoverride-vars", "Allow vars to be overridden.") + val YoverrideVars = BooleanSetting("-Yoverride-vars", "Allow vars to be overridden.") val Yhelp = BooleanSetting("-Y", "Print a synopsis of private options.") val Ycheck = PhasesSetting("-Ycheck", "Check the tree at the end of") val YcheckMods = BooleanSetting("-Ycheck-mods", "Check that symbols and their defining trees have modifiers in sync") - val debug = BooleanSetting("-Ydebug", "Increase the quantity of debugging output.") - val debugTrace = BooleanSetting("-Ydebug-trace", "Trace core operations") - val debugFlags = BooleanSetting("-Ydebug-flags", "Print all flags of definitions") - val debugNames = BooleanSetting("-Ydebug-names", "Show internal representation of names") - val debugOwners = BooleanSetting("-Ydebug-owners", "Print all owners of definitions (requires -Yprint-syms)") - val termConflict = ChoiceSetting("-Yresolve-term-conflict", "strategy", "Resolve term conflicts", List("package", "object", "error"), "error") - val log = PhasesSetting("-Ylog", "Log operations during") - val emitTasty = BooleanSetting("-YemitTasty", "Generate tasty in separate *.tasty file.") + val Ydebug = BooleanSetting("-Ydebug", "Increase the quantity of debugging output.") + val YdebugTrace = BooleanSetting("-Ydebug-trace", "Trace core operations") + val YdebugFlags = BooleanSetting("-Ydebug-flags", "Print all flags of definitions") + val YdebugNames = BooleanSetting("-Ydebug-names", "Show internal representation of names") + val YdebugOwners = BooleanSetting("-Ydebug-owners", "Print all owners of definitions (requires -Yprint-syms)") + val YtermConflict = ChoiceSetting("-Yresolve-term-conflict", "strategy", "Resolve term conflicts", List("package", "object", "error"), "error") + val Ylog = PhasesSetting("-Ylog", "Log operations during") + val YemitTasty = BooleanSetting("-Yemit-tasty", "Generate tasty in separate *.tasty file.") val Ylogcp = BooleanSetting("-Ylog-classpath", "Output information about what classpath is being applied.") val YdisableFlatCpCaching = BooleanSetting("-YdisableFlatCpCaching", "Do not cache flat classpath representation of classpath elements from jars across compiler instances.") @@ -95,7 +95,7 @@ class ScalaSettings extends Settings.SettingGroup { val YshowSuppressedErrors = BooleanSetting("-Yshow-suppressed-errors", "Also show follow-on errors and warnings that are normally supressed.") val YdetailedStats = BooleanSetting("-Ydetailed-stats", "show detailed internal compiler stats (needs Stats.enabled to be set to true).") val Yheartbeat = BooleanSetting("-Ydetailed-stats", "show heartbeat stack trace of compiler operations (needs Stats.enabled to be set to true).") - val Yprintpos = BooleanSetting("-Yprintpos", "show tree positions.") + val YprintPos = BooleanSetting("-Yprint-pos", "show tree positions.") val YnoDeepSubtypes = BooleanSetting("-Yno-deep-subtypes", "throw an exception on deep subtyping call stacks.") val YnoPatmatOpt = BooleanSetting("-Yno-patmat-opt", "disable all pattern matching optimizations.") val YplainPrinter = BooleanSetting("-Yplain-printer", "Pretty-print using a plain printer.") @@ -111,16 +111,16 @@ class ScalaSettings extends Settings.SettingGroup { val YshowTreeIds = BooleanSetting("-Yshow-tree-ids", "Uniquely tag all tree nodes in debugging output.") /** Area-specific debug output */ - val Yexplainlowlevel = BooleanSetting("-Yexplain-lowlevel", "When explaining type errors, show types at a lower level.") + val YexplainLowlevel = BooleanSetting("-Yexplain-lowlevel", "When explaining type errors, show types at a lower level.") val YnoDoubleBindings = BooleanSetting("-Yno-double-bindings", "Assert no namedtype is bound twice (should be enabled only if program is error-free).") val YshowVarBounds = BooleanSetting("-Yshow-var-bounds", "Print type variables with their bounds") val YnoInline = BooleanSetting("-Yno-inline", "Suppress inlining.") /** Linker specific flags */ - val YoptPhases = PhasesSetting("-Yopt-phases", "Restrict the optimisation phases to execute under -optimise.") - val YoptFuel = IntSetting("-Yopt-fuel", "Maximum number of optimisations performed under -optimise.", -1) val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying local optimisations to the .program") withAbbreviation "-optimize" val Xlink = BooleanSetting("-Xlink", "Recompile library code with the application.") + val YoptPhases = PhasesSetting("-Yopt-phases", "Restrict the optimisation phases to execute under -optimise.") + val YoptFuel = IntSetting("-Yopt-fuel", "Maximum number of optimisations performed under -optimise.", -1) /** Dottydoc specific settings */ val siteRoot = StringSetting( diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index baea88f0ebed..d7862a6e7ed1 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -368,7 +368,7 @@ object Contexts { def erasedTypes: Boolean = phase.erasedTypes /** Is the debug option set? */ - def debug: Boolean = base.settings.debug.value + def debug: Boolean = base.settings.Ydebug.value /** Is the verbose option set? */ def verbose: Boolean = base.settings.verbose.value @@ -475,7 +475,7 @@ object Contexts { def setSetting[T](setting: Setting[T], value: T): this.type = setSettings(setting.updateIn(settingsState, value)) - def setDebug = setSetting(base.settings.debug, true) + def setDebug = setSetting(base.settings.Ydebug, true) } implicit class ModeChanges(val c: Context) extends AnyVal { diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index b1c618a15a50..4a2d3092febc 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -30,7 +30,7 @@ object NameOps { */ def apply(s: String)(implicit ctx: Context): String = { val marker = "$$$$" - val limit: Int = ctx.settings.maxClassfileName.value + val limit: Int = ctx.settings.XmaxClassfileName.value val MaxNameLength = (limit - 6) min 2 * (limit - 6 - 2 * marker.length - 32) def toMD5(s: String, edge: Int): String = { diff --git a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala index 1703a0c834ff..ca7a889affeb 100644 --- a/compiler/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/compiler/src/dotty/tools/dotc/core/SymDenotations.scala @@ -1959,7 +1959,7 @@ object SymDenotations { val (location, src) = if (file != null) (s" in $file", file.toString) else ("", "the signature") - val name = ctx.fresh.setSetting(ctx.settings.debugNames, true).nameString(denot.name) + val name = ctx.fresh.setSetting(ctx.settings.YdebugNames, true).nameString(denot.name) def errMsg = i"""bad symbolic reference. A signature$location |refers to $name in ${denot.owner.showKind} ${denot.owner.showFullName} which is not available. diff --git a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala index 5bb2324372fc..da1716dd38d4 100644 --- a/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala +++ b/compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala @@ -71,11 +71,11 @@ class SymbolLoaders { // offer a setting to resolve the conflict one way or the other. // This was motivated by the desire to use YourKit probes, which // require yjp.jar at runtime. See SI-2089. - if (ctx.settings.termConflict.isDefault) + if (ctx.settings.YtermConflict.isDefault) throw new TypeError( i"""$owner contains object and package with same name: $pname |one of them needs to be removed from classpath""") - else if (ctx.settings.termConflict.value == "package") { + else if (ctx.settings.YtermConflict.value == "package") { ctx.warning( s"Resolving package/object name conflict in favor of package ${preExisting.fullName}. The object will be inaccessible.") owner.asClass.delete(preExisting) @@ -265,7 +265,7 @@ abstract class SymbolLoader extends LazyType { } try { val start = currentTime - if (ctx.settings.debugTrace.value) + if (ctx.settings.YdebugTrace.value) trace(s">>>> loading ${root.debugString}", _ => s"<<<< loaded ${root.debugString}") { doComplete(root) } diff --git a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala index 7ce696d5412c..eec7130675e8 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeComparer.scala @@ -1625,7 +1625,7 @@ class ExplainingTypeComparer(initctx: Context) extends TypeComparer(initctx) { } private def show(res: Any) = res match { - case res: printing.Showable if !ctx.settings.Yexplainlowlevel.value => res.show + case res: printing.Showable if !ctx.settings.YexplainLowlevel.value => res.show case _ => String.valueOf(res) } diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index 1689ac392031..c57d6d1fbb3c 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -326,7 +326,7 @@ class PlainPrinter(_ctx: Context) extends Printer { } val trueDecls = otherDecls.filterNot(treatAsTypeArg) val declsText = - if (trueDecls.isEmpty || !ctx.settings.debug.value) Text() + if (trueDecls.isEmpty || !ctx.settings.Ydebug.value) Text() else dclsText(trueDecls) tparamsText ~ " extends " ~ toTextParents(tp.parents) ~ "{" ~ selfText ~ declsText ~ "} at " ~ preText @@ -485,12 +485,12 @@ class PlainPrinter(_ctx: Context) extends Printer { val elems = Text(node.productIterator.map(toTextElem).toList, ", ") val tpSuffix = - if (ctx.settings.printtypes.value && tree.hasType) + if (ctx.settings.XprintTypes.value && tree.hasType) " | " ~ toText(tree.typeOpt) else Text() - nodeName ~ "(" ~ elems ~ tpSuffix ~ ")" ~ (node.pos.toString provided ctx.settings.Yprintpos.value) + nodeName ~ "(" ~ elems ~ tpSuffix ~ ")" ~ (node.pos.toString provided ctx.settings.YprintPos.value) case _ => tree.fallbackToText(this) } diff --git a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala index 4a83041e35ae..e0fb5e7a9bb9 100644 --- a/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -24,7 +24,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { /** A stack of enclosing DefDef, TypeDef, or ClassDef, or ModuleDefs nodes */ private[this] var enclosingDef: untpd.Tree = untpd.EmptyTree private[this] var myCtx: Context = _ctx - private[this] var printPos = ctx.settings.Yprintpos.value + private[this] var printPos = ctx.settings.YprintPos.value private[this] val printLines = ctx.settings.printLines.value override protected[this] implicit def ctx: Context = myCtx @@ -63,7 +63,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { protected val PrintableFlags = (SourceModifierFlags | Label | Module | Local).toCommonFlags override def nameString(name: Name): String = - if (ctx.settings.debugNames.value) name.debugString else name.toString + if (ctx.settings.YdebugNames.value) name.debugString else name.toString override protected def simpleNameString(sym: Symbol): String = nameString(if (ctx.property(XprintMode).isEmpty) sym.originalName else sym.name) @@ -257,7 +257,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { def modText(mods: untpd.Modifiers, kw: String): Text = { // DD val suppressKw = if (enclDefIsClass) mods is ParamAndLocal else mods is Param var flagMask = - if (ctx.settings.debugFlags.value) AnyFlags + if (ctx.settings.YdebugFlags.value) AnyFlags else if (suppressKw) PrintableFlags &~ Private else PrintableFlags if (homogenizedView && mods.flags.isTypeFlags) flagMask &~= Implicit // drop implicit from classes @@ -283,7 +283,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { def dclTextOr(treeText: => Text) = if (useSymbol) annotsText(tree.symbol) ~~ dclText(tree.symbol) ~ - ( " " provided ctx.settings.debugOwners.value) + ( " " provided ctx.settings.YdebugOwners.value) else treeText def idText(tree: untpd.Tree): Text = { @@ -608,8 +608,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { case _ => false } - if (ctx.settings.printtypes.value && tree.hasType) { - // add type to term nodes; replace type nodes with their types unless -Yprintpos is also set. + if (ctx.settings.XprintTypes.value && tree.hasType) { + // add type to term nodes; replace type nodes with their types unless -Yprint-pos is also set. def tp = tree.typeOpt match { case tp: TermRef if tree.isInstanceOf[RefTree] && !tp.denot.isOverloaded => tp.underlying case tp => tp @@ -688,7 +688,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { } override def toTextFlags(sym: Symbol) = - if (ctx.settings.debugFlags.value) + if (ctx.settings.YdebugFlags.value) super.toTextFlags(sym) else { var flags = sym.flagsUNSAFE diff --git a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala index 10ec402b8432..eb40cab959a2 100644 --- a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala @@ -25,7 +25,7 @@ class ConsoleReporter( val didPrint = m match { case m: Error => printMessage(messageAndPos(m.contained(), m.pos, diagnosticLevel(m))) - if (ctx.settings.prompt.value) displayPrompt() + if (ctx.settings.Xprompt.value) displayPrompt() true case m: ConditionalWarning if !m.enablingOption.value => false diff --git a/compiler/src/dotty/tools/dotc/reporting/Reporter.scala b/compiler/src/dotty/tools/dotc/reporting/Reporter.scala index 708a38512b32..73443871c2bb 100644 --- a/compiler/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/Reporter.scala @@ -103,7 +103,7 @@ trait Reporting { this: Context => * "contains" here. */ def log(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = - if (this.settings.log.value.containsPhase(phase)) + if (this.settings.Ylog.value.containsPhase(phase)) echo(s"[log ${ctx.phasesStack.reverse.mkString(" -> ")}] $msg", pos) def debuglog(msg: => String): Unit = @@ -123,7 +123,7 @@ trait Reporting { this: Context => } def debugwarn(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = - if (this.settings.debug.value) warning(msg, pos) + if (this.settings.Ydebug.value) warning(msg, pos) } /** diff --git a/compiler/src/dotty/tools/dotc/reporting/trace.scala b/compiler/src/dotty/tools/dotc/reporting/trace.scala index 6e10be9dc7f2..4d4c0578ffb9 100644 --- a/compiler/src/dotty/tools/dotc/reporting/trace.scala +++ b/compiler/src/dotty/tools/dotc/reporting/trace.scala @@ -11,7 +11,7 @@ object trace { @inline def onDebug[TD](question: => String)(op: => TD)(implicit ctx: Context): TD = - conditionally(ctx.settings.debugTrace.value, question, false)(op) + conditionally(ctx.settings.YdebugTrace.value, question, false)(op) @inline def conditionally[TC](cond: Boolean, question: => String, show: Boolean)(op: => TC)(implicit ctx: Context): TC = diff --git a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala index 532aef36b723..24d5da69afb0 100644 --- a/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala +++ b/compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala @@ -565,7 +565,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder // typed tree of the method as part of the signature we send to sbt. // To do this properly we would need a way to hash trees and types in // dotty itself. - val printTypesCtx = ctx.fresh.setSetting(ctx.settings.printtypes, true) + val printTypesCtx = ctx.fresh.setSetting(ctx.settings.XprintTypes, true) annots += marker(Inliner.bodyToInline(s).show(printTypesCtx).toString) } diff --git a/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala b/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala index 22a700bdb734..e347b1460fe1 100644 --- a/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala +++ b/compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala @@ -107,7 +107,7 @@ object ResolveSuper { ctx.debuglog(i"starting rebindsuper from $base of ${acc.showLocated}: ${acc.info} in $bcs, name = $memberName") while (bcs.nonEmpty && sym == NoSymbol) { val other = bcs.head.info.nonPrivateDecl(memberName) - if (ctx.settings.debug.value) + if (ctx.settings.Ydebug.value) ctx.log(i"rebindsuper ${bcs.head} $other deferred = ${other.symbol.is(Deferred)}") sym = other.matchingDenotation(base.thisType, base.thisType.memberInfo(acc)).symbol bcs = bcs.tail diff --git a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala index 07164bc68f8d..f93b0b77263b 100644 --- a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala @@ -218,7 +218,7 @@ object RefChecks { ";\n (Note that %s is abstract,\n and is therefore overridden by concrete %s)".format( infoStringWithLocation(other), infoStringWithLocation(member)) - else if (ctx.settings.debug.value) + else if (ctx.settings.Ydebug.value) err.typeMismatchMsg(memberTp(self), otherTp(self)) else "" @@ -355,7 +355,7 @@ object RefChecks { other.accessedFieldOrGetter.is(Mutable, butNot = Lazy)) { // !?! this is not covered by the spec. We need to resolve this either by changing the spec or removing the test here. // !!! is there a !?! convention? I'm !!!ing this to make sure it turns up on my searches. - if (!ctx.settings.overrideVars.value) + if (!ctx.settings.YoverrideVars.value) overrideError("cannot override a mutable variable") } else if (member.isAnyOverride && !(member.owner.thisType.baseClasses exists (_ isSubClass other.owner)) && diff --git a/compiler/test/dotc/tests.scala b/compiler/test/dotc/tests.scala index a81a8c12fce0..c626f0d80976 100644 --- a/compiler/test/dotc/tests.scala +++ b/compiler/test/dotc/tests.scala @@ -73,7 +73,7 @@ class tests extends CompilerTest { else List("-Ycheck:tailrec,resolveSuper,mixin,elimStaticThis,labelDef,simplify") } ++ checkOptions ++ classPath - val testPickling = List("-Xprint-types", "-Ytest-pickler", "-Ystop-after:pickler", "-Yprintpos") + val testPickling = List("-Xprint-types", "-Ytest-pickler", "-Ystop-after:pickler", "-Yprint-pos") val twice = List("#runs", "2") val staleSymbolError: List[String] = List() diff --git a/compiler/test/dotty/tools/ShowClassTests.scala b/compiler/test/dotty/tools/ShowClassTests.scala index fd01a6b59f34..12a86dc5d764 100644 --- a/compiler/test/dotty/tools/ShowClassTests.scala +++ b/compiler/test/dotty/tools/ShowClassTests.scala @@ -55,8 +55,8 @@ class ShowClassTests extends DottyTest { "dotty.tools.dotc.core.pickling.AbstractFileReader") def doTwice(test: Context => Unit)(implicit ctx: Context): Unit = { - test(ctx.fresh.setSetting(ctx.base.settings.debug, true)) - test(ctx.fresh.setSetting(ctx.base.settings.debug, false)) + test(ctx.fresh.setSetting(ctx.base.settings.Ydebug, true)) + test(ctx.fresh.setSetting(ctx.base.settings.Ydebug, false)) } def showPackage(pkg: TermSymbol)(implicit ctx: Context): Unit = { diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index cf9b12c26bd7..8326468c5ffa 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -96,7 +96,7 @@ class CompilationTests extends ParallelTesting { compileFilesInDir("../tests/pos-scala2", scala2Mode) + compileFilesInDir("../tests/pos", defaultOptions) + compileFilesInDir("../tests/pos-deep-subtype", allowDeepSubtypes) + - compileDir("../tests/pos/i1137-1", defaultOptions and "-YemitTasty") + + compileDir("../tests/pos/i1137-1", defaultOptions and "-Yemit-tasty") + compileFile( // succeeds despite -Xfatal-warnings because of -nowarn "../tests/neg/customArgs/xfatalWarnings.scala", diff --git a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala index cd80f4e744c6..0d744feeb814 100644 --- a/compiler/test/dotty/tools/dotc/IdempotencyTests.scala +++ b/compiler/test/dotty/tools/dotc/IdempotencyTests.scala @@ -28,7 +28,7 @@ class IdempotencyTests extends ParallelTesting { @Category(Array(classOf[SlowTests])) @Test def idempotency: Unit = { implicit val testGroup: TestGroup = TestGroup("idempotency") - val opt = defaultOptions.and("-YemitTasty") + val opt = defaultOptions.and("-Yemit-tasty") def sourcesFrom(dir: Path) = CompilationTests.sources(Files.walk(dir)) diff --git a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala index 938808c27efe..75c2f6c87089 100644 --- a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala +++ b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala @@ -54,7 +54,7 @@ object TestConfiguration { val picklingOptions = defaultUnoptimised and ( "-Xprint-types", "-Ytest-pickler", - "-Yprintpos" + "-Yprint-pos" ) val scala2Mode = defaultOptions and "-language:Scala2" val explicitUTF8 = defaultOptions and ("-encoding", "UTF8") diff --git a/doc-tool/src/dotty/tools/dottydoc/core/ContextDottydoc.scala b/doc-tool/src/dotty/tools/dottydoc/core/ContextDottydoc.scala index 161e799da7ce..4e62b2d58dfd 100644 --- a/doc-tool/src/dotty/tools/dottydoc/core/ContextDottydoc.scala +++ b/doc-tool/src/dotty/tools/dottydoc/core/ContextDottydoc.scala @@ -53,7 +53,7 @@ class ContextDottydoc extends ContextDocstrings { def echo(msg: String)(implicit ctx: Context): Unit = echo(msg, NoSourcePosition) def debug(msg: String, pos: SourcePosition)(implicit ctx: Context): Unit = - if (ctx.settings.debug.value) ctx.inform({ + if (ctx.settings.Ydebug.value) ctx.inform({ "[doc debug] " + msg }.toString, pos) diff --git a/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala b/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala index 75350cffd4d9..efa011e0a8a8 100644 --- a/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala +++ b/doc-tool/src/dotty/tools/dottydoc/staticsite/Template.scala @@ -74,7 +74,7 @@ case class LiquidTemplate(path: String, content: SourceFile) extends Template wi None } case ex => { - if (true || ctx.settings.debug.value) + if (true || ctx.settings.Ydebug.value) throw ex None diff --git a/language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala b/language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala index 10445ac00bd1..3ba085b6c1c8 100644 --- a/language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala +++ b/language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala @@ -60,7 +60,7 @@ class DottyLanguageServer extends LanguageServer val configFile = new File(new URI(rootUri + '/' + IDE_CONFIG_FILE)) val configs: List[ProjectConfig] = (new ObjectMapper).readValue(configFile, classOf[Array[ProjectConfig]]).toList - val defaultFlags = List(/*"-Yplain-printer","-Yprintpos"*/) + val defaultFlags = List(/*"-Yplain-printer","-Yprint-pos"*/) myDrivers = new mutable.HashMap for (config <- configs) {