Skip to content

Commit 8d15e88

Browse files
committed
Make printFresh a -Y option
1 parent f0e0117 commit 8d15e88

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ private sealed trait YSettings:
452452
val YccDebug: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-debug", "Used in conjunction with captureChecking language import, debug info for captured references.")
453453
val YccNew: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-new", "Used in conjunction with captureChecking language import, try out new variants (debug option)")
454454
val YccLog: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-log", "Used in conjunction with captureChecking language import, print tracing and debug info")
455+
val YccPrintFresh: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-print-fresh", "Print hidden sets of fresh `cap` instances")
455456
val YccPrintSetup: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-print-setup", "Used in conjunction with captureChecking language import, print trees after cc.Setup phase")
456457

457458
/** Area-specific debug output */

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

+1-1
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)