We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{code}new Array(...){code} with more than one dimension is not supported anymore:
new Array(1,1) error: too many arguments for constructor Array: (_length: Int)Array[T] new Array(1,1) ^
But RefChecks still checks for it:
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.pos, etpe, false) } } val newResult = localTyper.typedPos(tree.pos) { new ApplyToImplicitArgs(gen.mkMethodCall(ArrayModule, nme.ofDim, args), List(manif)) } currentApplication = tree newResult
This looks like dead code to me.
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-5034?orig=1 Reporter: @soc
Sorry, something went wrong.
@soc said: Merged in scala/scala@9f96227
paulp
No branches or pull requests
{code}new Array(...){code}
with more than one dimension is not supported anymore:
But RefChecks still checks for it:
This looks like dead code to me.
The text was updated successfully, but these errors were encountered: