Closed allanrenucci closed 6 years ago
@sjrd Yes, that's my sentiment as well. It needs to be documented thoroughly.
I’ve just pushed a commit to get withFilter
working. It is implemented on top of the unsound IterableCC
-like types, but I think if we want to get it right we’d really have to have one WithFilter
implementation per subclass of Iterable
.
I’ve also fixed ArrayDeque
so that Stack
and Queue
can benefit from its overrides.
Some junit/test
s are still failing with Dotty. They seem to be related with serialization, synchronization and garbage collection.
This PR has been ported to scala/scala but I leave it open here because we will eventually have to also port the part that touches the collections-contrib
project.
Superseded by #561 and scala/scala#6508
I'd like to point out that those
protected[this]
members are (likely) unsound. AFAICT, they're very similar tothisCollection
andtoCollection
in the old collections, which do causeClassCastException
s if they're not systematically overridden by subclasses.For example, see the old issue https://github.com/scala-js/scala-js/issues/843 and its fix https://github.com/scala-js/scala-js/pull/851/files.