summaryrefslogtreecommitdiff
path: root/test/files/jvm/t6941/Analyzed_1.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-02-03 09:48:41 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-02-03 09:48:41 -0800
commita4ace4b4d99e8fc2332c4ee746998056da110b50 (patch)
treec132ebd5e99fe9451b3b71d7f495a8452cc1ac97 /test/files/jvm/t6941/Analyzed_1.scala
parentd4b46f6e42c8124c54af56c0a3c1ac39b46b2c52 (diff)
parentb2117cf6f4080eff9028b2aa33a013329022efd6 (diff)
downloadscala-a4ace4b4d99e8fc2332c4ee746998056da110b50.tar.gz
scala-a4ace4b4d99e8fc2332c4ee746998056da110b50.tar.bz2
scala-a4ace4b4d99e8fc2332c4ee746998056da110b50.zip
Merge pull request #2033 from adriaanm/patmat-opt
pattern matching efficiency: addresses SI-6686 and SI-6941, affects SI-5739
Diffstat (limited to 'test/files/jvm/t6941/Analyzed_1.scala')
-rw-r--r--test/files/jvm/t6941/Analyzed_1.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/jvm/t6941/Analyzed_1.scala b/test/files/jvm/t6941/Analyzed_1.scala
new file mode 100644
index 0000000000..549abd5e64
--- /dev/null
+++ b/test/files/jvm/t6941/Analyzed_1.scala
@@ -0,0 +1,11 @@
+// this class's bytecode, compiled under -optimize is analyzed by the test
+// method a's bytecode should be identical to method b's bytecode
+class SameBytecode {
+ def a(xs: List[Int]) = xs match {
+ case x :: _ => x
+ }
+
+ def b(xs: List[Int]) = xs match {
+ case xs: ::[Int] => xs.hd$1
+ }
+} \ No newline at end of file