summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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