diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2010-09-29 15:01:34 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2010-09-29 15:01:34 +0000 |
commit | 7ee65e4667445f09e79a228a3df117b7eace331b (patch) | |
tree | 1842c1323568e8a8f2e765433f19eb5aaa1a8e19 | |
parent | 5f4a754228beeb302994e5597e6d93cf2a0e39e3 (diff) | |
download | scala-7ee65e4667445f09e79a228a3df117b7eace331b.tar.gz scala-7ee65e4667445f09e79a228a3df117b7eace331b.tar.bz2 scala-7ee65e4667445f09e79a228a3df117b7eace331b.zip |
Merged revisions 23129 via svnmerge from
https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk
........
r23129 | moors | 2010-09-28 22:20:21 +0200 (Tue, 28 Sep 2010) | 3 lines
partial revert of r23128 ("see #3859. need to instantiate type
parameters to nothing explicitly in manifestOfType's searchresult rather
than relying on later calls to instantiate."): the isArray_apply test
cleanup was not a good idea (my pre-commit automated testing turned out
to be broken.. me.gitfu--)
no review
........
-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 a05bedc97a..32db64679d 100644 --- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala +++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala @@ -218,8 +218,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 9efe53d96a..d58f881200 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2658,7 +2658,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) @@ -3384,7 +3384,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) |