diff options
author | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-10-28 20:08:09 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-12-02 21:38:36 +0100 |
commit | d99b7f4e1c848bb749206f36b4bbaa17f24fa2e4 (patch) | |
tree | 87022492935750f784d87ae1d3879b63ba94be2d /test | |
parent | f16f4ab157293ac6860d4b00578b983c90b8fc62 (diff) | |
download | scala-d99b7f4e1c848bb749206f36b4bbaa17f24fa2e4.tar.gz scala-d99b7f4e1c848bb749206f36b4bbaa17f24fa2e4.tar.bz2 scala-d99b7f4e1c848bb749206f36b4bbaa17f24fa2e4.zip |
SI-6547: elide box unbox pair only when primitives match
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t6547.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6547.scala | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/files/pos/t6547.flags b/test/files/pos/t6547.flags new file mode 100644 index 0000000000..c9b68d70dc --- /dev/null +++ b/test/files/pos/t6547.flags @@ -0,0 +1 @@ +-optimise diff --git a/test/files/pos/t6547.scala b/test/files/pos/t6547.scala new file mode 100644 index 0000000000..53bd798219 --- /dev/null +++ b/test/files/pos/t6547.scala @@ -0,0 +1,6 @@ +trait ConfigurableDefault[@specialized V] { + def fillArray(arr: Array[V], v: V) = (arr: Any) match { + case x: Array[Int] => null + case x: Array[Long] => v.asInstanceOf[Long] + } +} |