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

UnmodifiableMapView documentation is incomplete #28918

Closed
iarkh opened this issue Feb 28, 2017 · 0 comments
Closed

UnmodifiableMapView documentation is incomplete #28918

iarkh opened this issue Feb 28, 2017 · 0 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-documentation Prefer using 'type-documentation' and a specific area label. library-core

Comments

@iarkh
Copy link
Contributor

iarkh commented Feb 28, 2017

See https://api.dartlang.org/stable/1.22.1/dart-collection/UnmodifiableMapView/addAll.html, etc.

UnmodifiableMapView API Spec reads about addAll method:

Adds all key-value pairs of other to this map. If a key of other is already in this map, its value is overwritten.

However, actually UnmodifiableMapBase objects cannot be modified and addAll method throws UnsupportedError("Cannot modify unmodifiable map").

The same is true about clear, putIfAbsent, remove methods.

@anders-sandholm anders-sandholm added area-documentation Prefer using 'type-documentation' and a specific area label. area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core labels Feb 28, 2017
@floitschG floitschG self-assigned this Feb 28, 2017
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. area-documentation Prefer using 'type-documentation' and a specific area label. library-core
Projects
None yet
Development

No branches or pull requests

3 participants