summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-11-06 12:04:53 -0800
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-11-06 12:04:53 -0800
commit9d265965294e65c8f20a027254042c9468af83d9 (patch)
tree40d43067ae2b17417b0d5bcb1d3cf49b9192edb2 /src/compiler
parent757a3a738cbb373f8f10fdc1f01e9ab6176a7076 (diff)
parent46fc45e62a1f4ae5a17f5abcb346ff49cff5a7ea (diff)
downloadscala-9d265965294e65c8f20a027254042c9468af83d9.tar.gz
scala-9d265965294e65c8f20a027254042c9468af83d9.tar.bz2
scala-9d265965294e65c8f20a027254042c9468af83d9.zip
Merge pull request #1582 from retronym/ticket/revert-primitive-array-opt
Ticket/revert primitive array opt
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/CleanUp.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
index 3b74cb1168..122a37c0c6 100644
--- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala
+++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
@@ -624,11 +624,11 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
//
// See SI-6611; we must *only* do this for literal vararg arrays.
case Apply(appMeth, List(Apply(wrapRefArrayMeth, List(arg @ StripCast(ArrayValue(_, _)))), _))
- if wrapRefArrayMeth.symbol == Predef_wrapRefArray && appMeth.symbol == ArrayModule_genericApply =>
+ if (wrapRefArrayMeth.symbol == Predef_wrapRefArray &&
+ appMeth.symbol == ArrayModule_overloadedApply.suchThat {
+ _.tpe.resultType.dealias.typeSymbol == ObjectClass // [T: ClassTag](xs: T*): Array[T] post erasure
+ }) =>
super.transform(arg)
- case Apply(appMeth, List(elem0, Apply(wrapArrayMeth, List(rest @ ArrayValue(elemtpt, _)))))
- if wrapArrayMeth.symbol == Predef_wrapArray(elemtpt.tpe) && appMeth.symbol == ArrayModule_apply(elemtpt.tpe) =>
- super.transform(rest.copy(elems = elem0 :: rest.elems))
case _ =>
super.transform(tree)