summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/collection/mutable/FlatArray.scala11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/library/scala/collection/mutable/FlatArray.scala b/src/library/scala/collection/mutable/FlatArray.scala
index a7f994bf74..3e43b66ecf 100644
--- a/src/library/scala/collection/mutable/FlatArray.scala
+++ b/src/library/scala/collection/mutable/FlatArray.scala
@@ -60,8 +60,15 @@ extends AbstractSeq[T]
*/
object FlatArray {
- def empty[Boxed, Unboxed](elems: Boxed*)
- (implicit boxings: BoxingConversions[Boxed, Unboxed], elemManifest: ClassManifest[Unboxed]): FlatArray[Boxed] = apply()
+ def ofDim[Boxed, Unboxed](size:Int)
+ (implicit boxings: BoxingConversions[Boxed, Unboxed],
+ manifest: ClassManifest[Unboxed]): FlatArray[Boxed] = {
+ val elems = Array.ofDim[Unboxed](size)
+ new FlatArray.Impl(elems, boxings, manifest)
+ }
+
+ def empty[Boxed, Unboxed](implicit boxings: BoxingConversions[Boxed, Unboxed],
+ elemManifest: ClassManifest[Unboxed]): FlatArray[Boxed] = apply()
def apply[Boxed, Unboxed](elems: Boxed*)
(implicit boxings: BoxingConversions[Boxed, Unboxed], elemManifest: ClassManifest[Unboxed]): FlatArray[Boxed] = {