Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adriaan Moors authored

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 test/files/run/t3835.scala
9 test/files/run/t3835.scala
... ... @@ -1,4 +1,9 @@
1 1 object Test extends App {
2   - println((1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 })
3   - println(1 match { case \u00e9 => \u00e9 })
  2 + // work around optimizer bug SI-5672 -- generates wrong bytecode for switches in arguments
  3 + // virtpatmat happily emits a switch for a one-case switch, whereas -Xoldpatmat did not
  4 + // this is not the focus of this test, hence the temporary workaround
  5 + def a = (1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 }
  6 + println(a)
  7 + def b = (1 match { case \u00e9 => \u00e9 })
  8 + println(b)
4 9 }

0 comments on commit 9998a85

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