Skip to content

Wrong coll at ArrayBuffer.padTo #22892

Open
@som-snytt

Description

@som-snytt

Compiler version

3.6.4

Problem

ArrayBuffer#padTo doc does not respect its $coll definition. ("A copy of this sequence...")

https://www.scala-lang.org/files/archive/api/current/scala/collection/mutable/ArrayBuffer.html#padTo-fffffb3c

Expectation

Works as on Scala 2, where it calls itself an "array buffer".

https://www.scala-lang.org/api/2.13.15/scala/collection/mutable/ArrayBuffer.html#padTo[B%3E:A](len:Int,elem:B):CC[B]

Noticed at related ticket scala/bug#12908 (comment)

where Buffer is supplied with define coll so that it no longer calls itself "shrinkable".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions