diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/regularpatmat.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/regularpatmat.scala b/test/files/run/regularpatmat.scala index 2412c1786b..db52c47723 100644 --- a/test/files/run/regularpatmat.scala +++ b/test/files/run/regularpatmat.scala @@ -668,6 +668,25 @@ object testNN { } } +object testNO { // this does not need to be run, only compiled + + trait Operator; + case class Increment extends Operator; + case class Decrement extends Operator; + + trait Expression { + def eval = match { + case Operation (v: Value, o: Increment) => v + case Operation (v: Value, d: Decrement) => v + } + } + + case class Value extends Expression; + case class Operation (e: Expression, o: Operator) extends Expression; + + +} + object Test { def main(args: Array[String]): Unit = { Console.println("pretest"); |