Skip to content

Commit 465c657

Browse files
committed
Make printFresh a -Y option
1 parent 0df1aaf commit 465c657

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ private sealed trait YSettings:
449449
val YccDebug: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-debug", "Used in conjunction with captureChecking language import, debug info for captured references.")
450450
val YccNew: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-new", "Used in conjunction with captureChecking language import, try out new variants (debug option)")
451451
val YccLog: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-log", "Used in conjunction with captureChecking language import, print tracing and debug info")
452+
val YccPrintFresh: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-print-fresh", "Print hidden sets of fresh `cap` instances")
452453
val YccPrintSetup: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-print-setup", "Used in conjunction with captureChecking language import, print trees after cc.Setup phase")
453454

454455
/** Area-specific debug output */

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
2828
protected def printDebug = ctx.settings.YprintDebug.value
2929

3030
/** Print Fresh.Cap instances as <cap hiding ...> */
31-
protected def printFreshDetailed = printDebug
31+
protected def printFreshDetailed = ctx.settings.YccPrintFresh.value
3232

3333
/** Print Fresh.Cap instances as "fresh" */
3434
protected def printFresh = printFreshDetailed || ctx.property(PrintFresh).isDefined

0 commit comments

Comments
 (0)