Closed noresttherein closed 1 year ago
Scala version: 2.13.10
Implementing IndexedSeq and not overriding head leads to an IOOBE being thrown, contrary to NSEE mentioned in the specification. This does not affect Vector, as it overrides head. The same goes for last.
IndexedSeq
head
Vector
last
@scala/collections
Is it possible to fix this without breaking binary compatibility?
apply has the annotation, and this is the first time I've noticed how it is rendered:
apply
head has only Scaladoc.
Reproduction steps
Scala version: 2.13.10
Problem
Implementing
IndexedSeq
and not overridinghead
leads to an IOOBE being thrown, contrary to NSEE mentioned in the specification. This does not affectVector
, as it overrideshead
. The same goes forlast
.