diff options
Diffstat (limited to 'tests/untried/pos/listpattern.scala')
-rw-r--r-- | tests/untried/pos/listpattern.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/untried/pos/listpattern.scala b/tests/untried/pos/listpattern.scala new file mode 100644 index 000000000..47145bf03 --- /dev/null +++ b/tests/untried/pos/listpattern.scala @@ -0,0 +1,8 @@ +trait Value {} +case class FloatValue(x: Double) extends Value +object Test { + def applyNumeric(op: (Double, Double) => Double): + PartialFunction[List[Value], Value] = { + case List(FloatValue(x), FloatValue(y)) => FloatValue(op(x, y)) + } +} |