diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-03-23 21:10:43 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-18 14:46:57 +0200 |
commit | 3fc2b6e022a9ca38f93aa778999516d8e67576cf (patch) | |
tree | 3d85e0be3f4326e3f855003c9242fb6d20352c26 /tests | |
parent | 57fcea6ee648164d7fd7597b34d50709ddaf4952 (diff) | |
download | dotty-3fc2b6e022a9ca38f93aa778999516d8e67576cf.tar.gz dotty-3fc2b6e022a9ca38f93aa778999516d8e67576cf.tar.bz2 dotty-3fc2b6e022a9ca38f93aa778999516d8e67576cf.zip |
Add a test to check multidimenstionall arrays.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/MultiArr.scala | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/run/MultiArr.scala b/tests/run/MultiArr.scala new file mode 100644 index 000000000..b98e512c7 --- /dev/null +++ b/tests/run/MultiArr.scala @@ -0,0 +1,37 @@ +class Arr { + val s = new Array[Int](1) + val s2 = new Array[Array[Int]](2) + val s3: Array[Array[Int]] = Array.ofDim(2,3) + /* +public Arr(); + Code: + 0: aload_0 + 1: invokespecial #14 // Method java/lang/Object."<init>":()V + 4: aload_0 + 5: iconst_1 + 6: newarray int + 8: checkcast #15 // class "[I" + 11: putfield #17 // Field s$$local:[I + 14: aload_0 + 15: iconst_2 + 16: anewarray #15 // class "[I" + 19: checkcast #18 // class "[[I" + 22: putfield #20 // Field s2$$local:[[I + 25: aload_0 + 26: getstatic #26 // Field scala/Array$.MODULE$:Lscala/Array$; + 29: pop + 30: iconst_2 + 31: iconst_3 + 32: multianewarray #18, 2 // class "[[I" + 36: checkcast #18 // class "[[I" + 39: putfield #28 // Field s3$$local:[[I + 42: return +*/ +} + +object Test{ + def main(args: Array[String]): Unit = { + new Arr + } +} + |