Closed julienrf closed 6 years ago
If I understand correctly, those empty collections would inherit def knownSize: Int = -1
. It seems that this should not lead to correctness bugs, i.e., indexOfSlice
is using knownSize
wrongly - no?
That’s a good point, actually indexOfSlice
’s implementation is missing a test that makes it incorrect in the case the receiver is empty (but knownSize
is -1
). I’ve just added it.
Fixes scala/collection-strawman#437