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

List<E>.mappedBy actually returns a List but this is hidden and thus useless #8064

Closed
mraleph opened this issue Jan 23, 2013 · 2 comments
Closed
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.

Comments

@mraleph
Copy link
Member

mraleph commented Jan 23, 2013

List<T> does not override mappedBy so it is just inherited from Iterable where it has signature

Iterable mappedBy(f(E element))

However List factory actually produces list objects that return MappedList from mappedBy.

However this is not visible in any way.

Editor warn that Iterable has no operator [] if I write

[0].mappedBy((x)=>x)[0]

or

foo(List<T> l) {
  l.mappedBy((x)=>x)[0]
}

While the first one can potentially be treated as an Editor issue, as it is unable to properly resolve mappedBy even given concrete type of the literal, the second one is clearly a library issue.

@floitschG
Copy link
Contributor

Added Started label.

@floitschG
Copy link
Contributor

Fixed in r17918.


Added Fixed label.

@mraleph mraleph added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Jan 31, 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.
Projects
None yet
Development

No branches or pull requests

2 participants