From 8a9fd64129926eea35f7dca181242855f14e153f Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 20 Oct 2011 22:29:20 +0000 Subject: virtpatmat, hidden behind -Yvirtpatmat at least one imminent TODO: undo hardwired generation of if/then/else, and decide based on type whether to call flatMap/orElse or inline those methods from Option review by extempore --- test/files/run/virtpatmat_apply.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/run/virtpatmat_apply.scala (limited to 'test/files/run/virtpatmat_apply.scala') diff --git a/test/files/run/virtpatmat_apply.scala b/test/files/run/virtpatmat_apply.scala new file mode 100644 index 0000000000..b8776f4afb --- /dev/null +++ b/test/files/run/virtpatmat_apply.scala @@ -0,0 +1,7 @@ +object Test extends App { + List(1, 2, 3) match { + case Nil => println("FAIL") + case x :: y :: xs if xs.length == 2 => println("FAIL") + case x :: y :: xs if xs.length == 1 => println("OK "+ y) + } +} \ No newline at end of file -- cgit v1.2.3