Skip to content

Commit cfb3472

Browse files
committed
fix VectorMap#init and VectorMap#tail
fixes part of scala/bug#11100
1 parent b8875af commit cfb3472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/library/scala/collection/immutable/VectorMap.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ final class VectorMap[K, +V] private[immutable] (
9595
}
9696

9797
override def tail: VectorMap[K, V] = {
98-
new VectorMap(fields.tail, underlying.remove(fields.last))
98+
new VectorMap(fields.tail, underlying.remove(fields.head))
9999
}
100100

101101
override def init: VectorMap[K, V] = {
102-
new VectorMap(fields.init, underlying.remove(fields.head))
102+
new VectorMap(fields.init, underlying.remove(fields.last))
103103
}
104104

105105
// Only care about content, not ordering for equality

0 commit comments

Comments
 (0)