diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/ParallelMatching.scala | 2 | ||||
-rw-r--r-- | test/files/pos/bug3534.scala | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala index f9e7a1bdcf..f22c876085 100644 --- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala +++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala @@ -737,7 +737,7 @@ trait ParallelMatching extends ast.TreeDSL def duplicate = body.duplicate setType bodyTpe def isFinal = true - def isLabellable = !cond(body) { case _: Throw | _: Literal => true } + def isLabellable = !cond(body) { case _: Literal => true } def isNotReached = referenceCount == 0 def isReachedOnce = referenceCount == 1 def isReachedTwice = referenceCount > 1 diff --git a/test/files/pos/bug3534.scala b/test/files/pos/bug3534.scala new file mode 100644 index 0000000000..d926d4e286 --- /dev/null +++ b/test/files/pos/bug3534.scala @@ -0,0 +1,6 @@ +object Test { + List[Option[Int]]() match { + case None :: bb :: cc => () + case x => throw new Exception(x.filter(_.isDefined).mkString) + } + }
\ No newline at end of file |