Skip to content

Commit

Permalink
Removed dead code in RefChecks.
Browse files Browse the repository at this point in the history
Closes SI-5034.
  • Loading branch information
soc committed Feb 20, 2012
1 parent a6a9684 commit fa8ef34
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
Expand Up @@ -1451,26 +1451,6 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R


transform(qual) transform(qual)


case Apply(Select(New(tpt), name), args)
if (tpt.tpe.typeSymbol == ArrayClass && args.length >= 2) =>
unit.deprecationWarning(tree.pos,
"new Array(...) with multiple dimensions has been deprecated; use Array.ofDim(...) instead")
val manif = {
var etpe = tpt.tpe
for (_ <- args) { etpe = etpe.typeArgs.headOption.getOrElse(NoType) }
if (etpe == NoType) {
unit.error(tree.pos, "too many dimensions for array creation")
Literal(Constant(null))
} else {
localTyper.getManifestTree(tree, etpe, false)
}
}
val newResult = localTyper.typedPos(tree.pos) {
new ApplyToImplicitArgs(gen.mkMethodCall(ArrayModule, nme.ofDim, args), List(manif))
}
currentApplication = tree
newResult

case Apply(fn, args) => case Apply(fn, args) =>
checkSensible(tree.pos, fn, args) checkSensible(tree.pos, fn, args)
currentApplication = tree currentApplication = tree
Expand Down

0 comments on commit fa8ef34

Please sign in to comment.