List<E>.mappedBy actually returns a List but this is hidden and thus useless #8064
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
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.
The text was updated successfully, but these errors were encountered: