diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-02-05 21:21:53 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-02-06 01:12:41 +0100 |
commit | b33babc2398e5013820e21568713fdb6c15aa6fa (patch) | |
tree | cc0bd4cff43c6cfa7e3a1c2c9a09680fcc7d949d | |
parent | 4d988825e41a789383bdb53b5ef4ac68e37ad96d (diff) | |
download | dotty-b33babc2398e5013820e21568713fdb6c15aa6fa.tar.gz dotty-b33babc2398e5013820e21568713fdb6c15aa6fa.tar.bz2 dotty-b33babc2398e5013820e21568713fdb6c15aa6fa.zip |
Do not use the plain printer with -Ydebug
Instead, a new setting called -Yplain-printer is used for this.
After this commit, we can now run all tests with -Ydebug (this was not
the case before because using the plain printer breaks -Ytest-pickler)
-rw-r--r-- | src/dotty/tools/dotc/config/ScalaSettings.scala | 1 | ||||
-rw-r--r-- | src/dotty/tools/dotc/printing/Printers.scala | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/config/ScalaSettings.scala b/src/dotty/tools/dotc/config/ScalaSettings.scala index b925ffa5a..035b20130 100644 --- a/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -151,6 +151,7 @@ class ScalaSettings extends Settings.SettingGroup { val Yheartbeat = BooleanSetting("-Yheartbeat", "show heartbeat stack trace of compiler operations.") val Yprintpos = BooleanSetting("-Yprintpos", "show tree positions.") val YnoDeepSubtypes = BooleanSetting("-Yno-deep-subtypes", "throw an exception on deep subtyping call stacks.") + val YplainPrinter = BooleanSetting("-Yplain-printer", "Pretty-print using a plain printer.") val YprintSyms = BooleanSetting("-Yprint-syms", "when printing trees print info in symbols instead of corresponding info in trees.") val YtestPickler = BooleanSetting("-Ytest-pickler", "self-test for pickling functionality; should be used with -Ystop-after:pickler") val YcheckReentrant = BooleanSetting("-Ycheck-reentrant", "check that compiled program does not contain vars that can be accessed from a global root.") diff --git a/src/dotty/tools/dotc/printing/Printers.scala b/src/dotty/tools/dotc/printing/Printers.scala index 7107ccb78..36043a4ff 100644 --- a/src/dotty/tools/dotc/printing/Printers.scala +++ b/src/dotty/tools/dotc/printing/Printers.scala @@ -8,7 +8,7 @@ trait Printers { this: Context => /** A function creating a printer */ def printer = { val pr = printerFn(this) - if (this.debug) pr.plain else pr + if (this.settings.YplainPrinter.value) pr.plain else pr } } |