diff options
author | Paul Phillips <paulp@improving.org> | 2010-09-15 23:13:03 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-09-15 23:13:03 +0000 |
commit | d5701f0c97a3d9a489da84d9f2c8062be6450c02 (patch) | |
tree | 6a05411cfbc7bf438c5cd892cbe84c5c0bfdb84a | |
parent | 726a3366519b61a63462cae38f8ce01c9bd62d90 (diff) | |
download | scala-d5701f0c97a3d9a489da84d9f2c8062be6450c02.tar.gz scala-d5701f0c97a3d9a489da84d9f2c8062be6450c02.tar.bz2 scala-d5701f0c97a3d9a489da84d9f2c8062be6450c02.zip |
Removed Throw from the set of unlabelled AST No...
Removed Throw from the set of unlabelled AST Nodes. Closes #3534, review
by dragos.
-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 |