diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-14 10:54:23 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-14 10:59:41 -0700 |
commit | 9d84e89d27c396203e84f6ae685863210ebc1968 (patch) | |
tree | 09793479707c30d70ca3f6353157bcca003bc0f4 /test/files/run/empty-array.scala | |
parent | f68201c469725c255ae2786f0ac1e37bc5f30a7a (diff) | |
download | scala-9d84e89d27c396203e84f6ae685863210ebc1968.tar.gz scala-9d84e89d27c396203e84f6ae685863210ebc1968.tar.bz2 scala-9d84e89d27c396203e84f6ae685863210ebc1968.zip |
Added constant empty array to the companion objects.
Because there are lots of times when you just need an
array and shouldn't have to allocate one every time or
pick a random spot to cache yet another empty array.
Diffstat (limited to 'test/files/run/empty-array.scala')
-rw-r--r-- | test/files/run/empty-array.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/empty-array.scala b/test/files/run/empty-array.scala new file mode 100644 index 0000000000..e56c86df5c --- /dev/null +++ b/test/files/run/empty-array.scala @@ -0,0 +1,8 @@ +object Test { + def main(args: Array[String]): Unit = { + println(Byte.emptyArray.length) + println(Double.emptyArray.length) + println(Boolean.emptyArray.length) + // okay okay okay + } +} |