From 45a49c276c83c751ed2120a26d2c45b1a1b5d9ff Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 29 Jan 2009 13:06:41 +0000 Subject: Deprecated new Array(...) syntax for dimensions... Deprecated new Array(...) syntax for dimensions > 1. --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3