Skip to content

Commit

Permalink
Make printFresh a -Y option
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Feb 7, 2025
1 parent 0df1aaf commit 465c657
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ private sealed trait YSettings:
val YccDebug: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-debug", "Used in conjunction with captureChecking language import, debug info for captured references.")
val YccNew: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-new", "Used in conjunction with captureChecking language import, try out new variants (debug option)")
val YccLog: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-log", "Used in conjunction with captureChecking language import, print tracing and debug info")
val YccPrintFresh: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-print-fresh", "Print hidden sets of fresh `cap` instances")
val YccPrintSetup: Setting[Boolean] = BooleanSetting(ForkSetting, "Ycc-print-setup", "Used in conjunction with captureChecking language import, print trees after cc.Setup phase")

/** Area-specific debug output */
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
protected def printDebug = ctx.settings.YprintDebug.value

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

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

0 comments on commit 465c657

Please sign in to comment.