Aladdin - Scala Bugtracking
[#1209] project: compiler priority: medium category: feature
submitter assigned to status date submitted
Nikolay Iulian fixed 2007-07-12 12:02:48.0
subject [contrib #686] Incorrect code for two-dimensional Array
code
From ScalaReference.pdf, pg 76
Draft per June 13, 2007

val zss: Array[Array[double]] = new Array(xss.length, yss.length) 
what happened
wrong number of arguments for constructor Array: (Int)Array[A]
what expected Construction of a two-dimensional Array with each dimension's size defined
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-07-12 12:08:42.0
Martin  edited on  2007-07-14 11:44:28.0
I think we should allow this. On the frontend side this is easy, just have secondary constructors
def this(dim1: Int, ..., dimN: Int) = 
  this(dim1); throw new Error()
for any reasonable number N. But the backend has to interprete these specially and translate to multi-dimensional array creations. I reassigned to Iulian.
Iulian  edited on  2007-07-23 16:59:12.0
I added multi-dimensional arrays to Scala (added constructors up to 9 dimensions in scala.Array).