diff options
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r-- | test/files/run/patmatnew.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index f4852b4a0c..3580e561e8 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -805,6 +805,19 @@ object Test extends TestConsoleMain { } } } + + sealed abstract class Tree + case class Node(l: Tree, v: Int, r: Tree) extends Tree + case object EmptyTree extends Tree + + object Ticket335 extends TestCase("#335") { // compile-only + override def runTest { + (EmptyTree: Tree) match { + case Node(_,v,_) if (v == 0) => 0 + case EmptyTree => 2 + } + } + } } |