File tree 2 files changed +3
-2
lines changed
compiler/src/dotty/tools/dotc
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 {
92
92
val YnoDeepSubtypes = BooleanSetting (" -Yno-deep-subtypes" , " throw an exception on deep subtyping call stacks." )
93
93
val YplainPrinter = BooleanSetting (" -Yplain-printer" , " Pretty-print using a plain printer." )
94
94
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." )
95
96
val YtestPickler = BooleanSetting (" -Ytest-pickler" , " self-test for pickling functionality; should be used with -Ystop-after:pickler" )
96
97
val YcheckReentrant = BooleanSetting (" -Ycheck-reentrant" , " check that compiled program does not contain vars that can be accessed from a global root." )
97
98
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 {
190
190
toTextLocal(tycon) ~ " [" ~ Text (args.map(argText), " , " ) ~ " ]"
191
191
case tp : TypeVar =>
192
192
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)
194
194
else {
195
195
val constr = ctx.typerState.constraint
196
196
val bounds =
197
197
if (constr.contains(tp)) constr.fullBounds(tp.origin)(ctx.addMode(Mode .Printing ))
198
198
else TypeBounds .empty
199
- if (bounds.isAlias) toText(bounds.lo) ~ " ^"
199
+ if (bounds.isAlias) toText(bounds.lo) ~ ( " ^" provided ctx.settings. YprintDebug .value)
200
200
else if (ctx.settings.YshowVarBounds .value) " (" ~ toText(tp.origin) ~ " ?" ~ toText(bounds) ~ " )"
201
201
else toText(tp.origin)
202
202
}
You can’t perform that action at this time.
0 commit comments