summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2010-09-28 20:20:21 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2010-09-28 20:20:21 +0000
commit0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429 (patch)
tree20b5dc96c2b5006b62f393b85afedcb718814400
parent4dc846980edd1fc33a021e4f80b7403c843e1991 (diff)
downloadscala-0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429.tar.gz
scala-0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429.tar.bz2
scala-0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429.zip
partial revert of r23128 ("see #3859.
no review
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index 34cc26ee99..4b5632f7d8 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -225,8 +225,6 @@ trait Definitions extends reflect.generic.StandardDefinitions {
lazy val Array_clone = getMember(ArrayClass, nme.clone_)
lazy val ArrayModule = getModule("scala.Array")
- def isArray_Apply(sym: Symbol): Boolean = sym.owner == ArrayModule.moduleClass && sym.name == nme.apply
-
// reflection / structural types
lazy val SoftReferenceClass = getClass("java.lang.ref.SoftReference")
lazy val WeakReferenceClass = getClass("java.lang.ref.WeakReference")
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 49e3505946..742f792e84 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2679,7 +2679,7 @@ trait Typers { self: Analyzer =>
// and Array.apply(x: Int, xs: Int*): Array[Int] (and similar)
case Apply(fun, args) =>
val typedFun = typed(fun, funMode(mode), WildcardType)
- if (isArray_Apply(typedFun.symbol))
+ if (typedFun.symbol.owner == ArrayModule.moduleClass && typedFun.symbol.name == nme.apply)
pt match {
case TypeRef(_, ArrayClass, targ :: _) =>
trees2ConstArg(args, targ)
@@ -3404,7 +3404,7 @@ trait Typers { self: Analyzer =>
res.tpe = res.tpe.notNull
}
*/
- if (isArray_Apply(fun2.symbol)) {
+ if (fun2.symbol == Array_apply) {
val checked = gen.mkCheckInit(res)
// this check is needed to avoid infinite recursion in Duplicators
// (calling typed1 more than once for the same tree)