File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ class ScalaSettings extends Settings.SettingGroup {
9292 val YnoDeepSubtypes = BooleanSetting (" -Yno-deep-subtypes" , " throw an exception on deep subtyping call stacks." )
9393 val YplainPrinter = BooleanSetting (" -Yplain-printer" , " Pretty-print using a plain printer." )
9494 val YprintSyms = BooleanSetting (" -Yprint-syms" , " when printing trees print info in symbols instead of corresponding info in trees." )
95+ val YprintDebug = BooleanSetting (" -Yprint-debug" , " when printing trees, print some extra information useful for debugging." )
9596 val YtestPickler = BooleanSetting (" -Ytest-pickler" , " self-test for pickling functionality; should be used with -Ystop-after:pickler" )
9697 val YcheckReentrant = BooleanSetting (" -Ycheck-reentrant" , " check that compiled program does not contain vars that can be accessed from a global root." )
9798 val YkeepComments = BooleanSetting (" -Ykeep-comments" , " Keep comments when scanning source files." )
Original file line number Diff line number Diff line change @@ -190,13 +190,13 @@ class PlainPrinter(_ctx: Context) extends Printer {
190190 toTextLocal(tycon) ~ " [" ~ Text (args.map(argText), " , " ) ~ " ]"
191191 case tp : TypeVar =>
192192 if (tp.isInstantiated)
193- toTextLocal(tp.instanceOpt) ~ " ^" // debug for now, so that we can see where the TypeVars are.
193+ toTextLocal(tp.instanceOpt) ~ ( " ^" provided ctx.settings. YprintDebug .value)
194194 else {
195195 val constr = ctx.typerState.constraint
196196 val bounds =
197197 if (constr.contains(tp)) constr.fullBounds(tp.origin)(ctx.addMode(Mode .Printing ))
198198 else TypeBounds .empty
199- if (bounds.isAlias) toText(bounds.lo) ~ " ^"
199+ if (bounds.isAlias) toText(bounds.lo) ~ ( " ^" provided ctx.settings. YprintDebug .value)
200200 else if (ctx.settings.YshowVarBounds .value) " (" ~ toText(tp.origin) ~ " ?" ~ toText(bounds) ~ " )"
201201 else toText(tp.origin)
202202 }
You can’t perform that action at this time.
0 commit comments