diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-11 04:58:17 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-11 04:58:17 +0000 |
commit | 9772ebe8ecfcbffb78b862a79320f40c9c26e7f1 (patch) | |
tree | 222463f3cc6814519a48cfee15e8178e95a4e383 | |
parent | dab6222b273e97934a7783aabd7717845f32db88 (diff) | |
download | scala-9772ebe8ecfcbffb78b862a79320f40c9c26e7f1.tar.gz scala-9772ebe8ecfcbffb78b862a79320f40c9c26e7f1.tar.bz2 scala-9772ebe8ecfcbffb78b862a79320f40c9c26e7f1.zip |
Fix for an unfortunate bug introduced in r19020...
Fix for an unfortunate bug introduced in r19020 which was causing
a great many unnecessary and unreachable MatchErrors to appear in
generated bytecode.
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/ParallelMatching.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala index fd4b57ef67..7fce0ee73a 100644 --- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala +++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala @@ -280,7 +280,9 @@ trait ParallelMatching extends ast.TreeDSL lazy val pvgroup = PatternVarGroup.fromBindings(subst.get()) - final def tree(): Tree = squeezedBlock(pvgroup.valDefs, codegen) + final def tree(): Tree = + if (guard.isEmpty) success + else squeezedBlock(pvgroup.valDefs, codegen) } /** Mixture rule for all literal ints (and chars) i.e. hopefully a switch |