diff options
Diffstat (limited to 'test/files/pos')
-rwxr-xr-x | test/files/pos/listpattern.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/listpattern.scala b/test/files/pos/listpattern.scala new file mode 100755 index 0000000000..47145bf037 --- /dev/null +++ b/test/files/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)) + } +} |