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 git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23129 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
da3494ab56
commit
e0559595dc
|
@ -224,9 +224,7 @@ trait Definitions extends reflect.generic.StandardDefinitions {
|
|||
def Array_length = getMember(ArrayClass, nme.length)
|
||||
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")
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue