summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/TreeGen.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-05-10 12:39:09 -0700
committerPaul Phillips <paulp@improving.org>2012-05-10 16:01:38 -0700
commit4db08212f63d3a5cd5467b91b25ff5b36e79fd5c (patch)
tree6fafc157026845c96378ad4d7373562bb4240a27 /src/compiler/scala/tools/nsc/ast/TreeGen.scala
parent1bff5703d28a0232dc772769dd6017862114a4a2 (diff)
downloadscala-4db08212f63d3a5cd5467b91b25ff5b36e79fd5c.tar.gz
scala-4db08212f63d3a5cd5467b91b25ff5b36e79fd5c.tar.bz2
scala-4db08212f63d3a5cd5467b91b25ff5b36e79fd5c.zip
Be discriminating about custom hashcodes.
If there are no primitives, use the regular boxy one.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeGen.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeGen.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeGen.scala b/src/compiler/scala/tools/nsc/ast/TreeGen.scala
index a93d9efded..23fcffd657 100644
--- a/src/compiler/scala/tools/nsc/ast/TreeGen.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreeGen.scala
@@ -236,7 +236,7 @@ abstract class TreeGen extends reflect.internal.TreeGen with TreeDSL {
mkMethodCall(
PredefModule,
wrapArrayMethodName(elemtp),
- if (isScalaValueType(elemtp)) Nil else List(elemtp),
+ if (isPrimitiveValueType(elemtp)) Nil else List(elemtp),
List(tree)
)
}
@@ -261,7 +261,7 @@ abstract class TreeGen extends reflect.internal.TreeGen with TreeDSL {
* elem type elemtp to expected type pt.
*/
def mkCastArray(tree: Tree, elemtp: Type, pt: Type) =
- if (elemtp.typeSymbol == AnyClass && isScalaValueType(tree.tpe.typeArgs.head))
+ if (elemtp.typeSymbol == AnyClass && isPrimitiveValueType(tree.tpe.typeArgs.head))
mkCast(mkRuntimeCall(nme.toObjectArray, List(tree)), pt)
else
mkCast(tree, pt)