diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-28 20:20:21 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-28 20:20:21 +0000 |
commit | 0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429 (patch) | |
tree | 20b5dc96c2b5006b62f393b85afedcb718814400 /src | |
parent | 4dc846980edd1fc33a021e4f80b7403c843e1991 (diff) | |
download | scala-0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429.tar.gz scala-0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429.tar.bz2 scala-0534bcaf69430d28adf0ac9d9f7ce8ef6e5ce429.zip |
partial revert of r23128 ("see #3859.
no review
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Definitions.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
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) |