Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve factory methods for FlatArray #5609

Closed
scabug opened this issue Mar 26, 2012 · 3 comments
Closed

improve factory methods for FlatArray #5609

scabug opened this issue Mar 26, 2012 · 3 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Mar 26, 2012

Right now FlatArray has two factory method constructors: empty and apply.

One of these (empty) has a broken signature:

empty[Boxed, Unboxed](elems: Boxed*)(implicit boxings: BoxingConversions[Boxed, Unboxed], elemManifest: ClassManifest[Unboxed]): FlatArray[Boxed]

The "elems" provided are ignored, so they should be omitted.

Also, this array lacks a method of specifying a size (without elements) like .ofDim. It should be possible to allocate a FlatArray of a certain size without actually providing all the members.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 26, 2012

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 26, 2012

@non said:
I opened a pull request with a patch to fix this issue:

scala/scala#329

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Mar 28, 2012

@non said:
Fixed in 4b0d4571.

@scabug scabug closed this Mar 28, 2012
@scabug scabug added the valueclass label Apr 7, 2017
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.