diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-04-14 18:03:32 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-04-14 19:33:46 +0200 |
commit | 9998a85b4c20f5f40b1739b379a11f005e2d8a80 (patch) | |
tree | e6ae277eda3c28c54d03c16188138ccba828e41c /test/files/run/t3835.scala | |
parent | ef809bb11c12a237d4d360b144426a3b4daa5c7f (diff) | |
download | scala-9998a85b4c20f5f40b1739b379a11f005e2d8a80.tar.gz scala-9998a85b4c20f5f40b1739b379a11f005e2d8a80.tar.bz2 scala-9998a85b4c20f5f40b1739b379a11f005e2d8a80.zip |
work around optimizer bug SI-5672
the optimizer generates wrong bytecode for switches in arguments
virtpatmat happily emits a switch for a one-case switch, whereas -Xoldpatmat did not
this is not the focus of this test, hence the temporary workaround
Diffstat (limited to 'test/files/run/t3835.scala')
-rw-r--r-- | test/files/run/t3835.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/files/run/t3835.scala b/test/files/run/t3835.scala index 49e591195f..c120a61f6e 100644 --- a/test/files/run/t3835.scala +++ b/test/files/run/t3835.scala @@ -1,4 +1,9 @@ object Test extends App { - println((1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 }) - println(1 match { case \u00e9 => \u00e9 }) + // work around optimizer bug SI-5672 -- generates wrong bytecode for switches in arguments + // virtpatmat happily emits a switch for a one-case switch, whereas -Xoldpatmat did not + // this is not the focus of this test, hence the temporary workaround + def a = (1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 } + println(a) + def b = (1 match { case \u00e9 => \u00e9 }) + println(b) } |