diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-11-08 18:14:04 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-11-08 18:14:04 +0000 |
commit | bf83b15cadf4bea4bc025ef84042f3bcbb5d3621 (patch) | |
tree | 2faad060fd7003f54045a4ef4cf3158fa5a65f55 /test/files | |
parent | 05b59f2c7d2e653b1bc5d132703aa60e062a2af4 (diff) | |
download | scala-bf83b15cadf4bea4bc025ef84042f3bcbb5d3621.tar.gz scala-bf83b15cadf4bea4bc025ef84042f3bcbb5d3621.tar.bz2 scala-bf83b15cadf4bea4bc025ef84042f3bcbb5d3621.zip |
Fixed ticket #193 by issuing a compile-time error.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/multi-array.check | 4 | ||||
-rw-r--r-- | test/files/neg/multi-array.scala | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/multi-array.check b/test/files/neg/multi-array.check new file mode 100644 index 0000000000..94d0613735 --- /dev/null +++ b/test/files/neg/multi-array.check @@ -0,0 +1,4 @@ +multi-array.scala:6: error: too many arguments for array constructor: found 2 but array has only 1 dimension(s) + val a: Array[Int] = new Array(10, 10) + ^ +one error found diff --git a/test/files/neg/multi-array.scala b/test/files/neg/multi-array.scala new file mode 100644 index 0000000000..993a1c0865 --- /dev/null +++ b/test/files/neg/multi-array.scala @@ -0,0 +1,7 @@ +/** Check that a multi-dimensional array can't be created + * when the wrong number of arguments w.r.t. to the array's + * type is given. + */ +class Foo { + val a: Array[Int] = new Array(10, 10) +} |