summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-01-29 13:06:41 +0000
committerMartin Odersky <odersky@gmail.com>2009-01-29 13:06:41 +0000
commit45a49c276c83c751ed2120a26d2c45b1a1b5d9ff (patch)
tree2e458f686e62f4a263fd114371d93260786c70bc /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent9bf8be6db86c0931937d367995a38bddbb5ac727 (diff)
downloadscala-45a49c276c83c751ed2120a26d2c45b1a1b5d9ff.tar.gz
scala-45a49c276c83c751ed2120a26d2c45b1a1b5d9ff.tar.bz2
scala-45a49c276c83c751ed2120a26d2c45b1a1b5d9ff.zip
Deprecated new Array(...) syntax for dimensions...
Deprecated new Array(...) syntax for dimensions > 1.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala6
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