aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PatternMatcher.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-02-05 01:57:02 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-02-05 02:05:51 +0100
commit11df014b7fab14999d2de1ce5f86ef860dabfe2e (patch)
treee7400179c59fea580e66fb96f6ed9b16cc0f1627 /src/dotty/tools/dotc/transform/PatternMatcher.scala
parent9d8c92d1d52fcfa95d57ce88d91dbb84c8ecfbd1 (diff)
downloaddotty-11df014b7fab14999d2de1ce5f86ef860dabfe2e.tar.gz
dotty-11df014b7fab14999d2de1ce5f86ef860dabfe2e.tar.bz2
dotty-11df014b7fab14999d2de1ce5f86ef860dabfe2e.zip
Hide stack traces behind -Ydebug
They're not very useful for end users and some tests like tests/neg/selfreq.scala always print these exceptions which makes it harder to read the test logs, Also use Thread.dumpStack() instead of creating an Exception and calling printStackTrace() on it.
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r--src/dotty/tools/dotc/transform/PatternMatcher.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala
index 7c8d0a10f..4d626c67b 100644
--- a/src/dotty/tools/dotc/transform/PatternMatcher.scala
+++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala
@@ -327,7 +327,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans
private[TreeMakers] def incorporateOuterRebinding(outerSubst: Rebindings): Unit = {
if (currSub ne null) {
ctx.debuglog("BUG: incorporateOuterRebinding called more than once for " + ((this, currSub, outerSubst)))
- Thread.dumpStack()
+ if (ctx.debug) Thread.dumpStack()
}
else currSub = outerSubst >> rebindings
}