Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 9998a85b4c20f5f40b1739b379a11f005e2d8a80 1 parent ef809bb
@adriaanm authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 test/files/run/t3835.scala
View
9 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)
}

0 comments on commit 9998a85

Please sign in to comment.
Something went wrong with that request. Please try again.