diff options
author | Martin Odersky <odersky@gmail.com> | 2009-01-29 13:06:41 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-01-29 13:06:41 +0000 |
commit | 45a49c276c83c751ed2120a26d2c45b1a1b5d9ff (patch) | |
tree | 2e458f686e62f4a263fd114371d93260786c70bc | |
parent | 9bf8be6db86c0931937d367995a38bddbb5ac727 (diff) | |
download | scala-45a49c276c83c751ed2120a26d2c45b1a1b5d9ff.tar.gz scala-45a49c276c83c751ed2120a26d2c45b1a1b5d9ff.tar.bz2 scala-45a49c276c83c751ed2120a26d2c45b1a1b5d9ff.zip |
Deprecated new Array(...) syntax for dimensions...
Deprecated new Array(...) syntax for dimensions > 1.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 9443fbf038..af010998b8 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -849,6 +849,12 @@ abstract class RefChecks extends InfoTransform { isIrrefutable(pat1, tpt.tpe)) => result = 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.withDims(...) instead") + currentApplication = tree + case Apply(fn, args) => checkSensible(tree.pos, fn, args) currentApplication = tree |