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

Make new Map() return an instance of the same type as '{}'. #5803

Closed
lrhn opened this issue Oct 11, 2012 · 9 comments
Closed

Make new Map() return an instance of the same type as '{}'. #5803

lrhn opened this issue Oct 11, 2012 · 9 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@lrhn
Copy link
Member

lrhn commented Oct 11, 2012

The specification doesn't say which type to use for '{}', but it must iterate the elements of a literal in key source order.
This is currently done by using a LinkedHashMap to preserve insertion order.
Doing "new Map()" gives a HashMap, not a LinkedHashMap.
The two should give the same type (or compatible subclasses), so "{}" and "new Map()" are equivalent.

@floitschG
Copy link
Contributor

Removed this from the M2 milestone.
Added this to the M3 milestone.

@floitschG
Copy link
Contributor

Added Accepted label.

@anders-sandholm
Copy link
Contributor

Removed this from the M3 milestone.
Added this to the M4 milestone.

@floitschG
Copy link
Contributor

Removed this from the M4 milestone.
Added this to the M5 milestone.
Added Ready-to-implement label.

@lrhn
Copy link
Member Author

lrhn commented Aug 23, 2013

This is a trivial change. We should either do it now, or decide not to do it.


Removed Priority-Medium label.
Added Priority-High label.

@sethladd
Copy link
Contributor

Please do this.

@lrhn
Copy link
Member Author

lrhn commented Aug 26, 2013

Added Fixed label.

@sethladd
Copy link
Contributor

Removed this from the M5 milestone.
Added this to the M6 milestone.
Added Docs-Requested label.

@kwalrath
Copy link
Contributor

Marked this as blocking #12877.

@lrhn lrhn added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Aug 29, 2013
@lrhn lrhn added this to the M6 milestone Aug 29, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants