Skip to content

Document and add tests: collection conversions of mutable create a copy #11872

@lrytz

Description

@lrytz
Member

Follow-up for #11868.

converting a mutable collection (to(collection.mutable.X), to(collection.X), toArray) always creates a copy, even if the original collection has a conforming type. converting an immutable collection doesn't copy if the collection's type conforms to the result.

Activity

added this to the Backlog milestone on Jan 31, 2020
magnolia-k

magnolia-k commented on Feb 16, 2020

@magnolia-k

Made a PR about changes to the documentation.
The next step is to add tests, but I'd like some advice on which tests to add, or create a new test file.

SethTisue

SethTisue commented on Feb 18, 2020

@SethTisue
Member

@Ichoran would scala/scala-collection-laws be a better place than scala/scala for a test like this, cutting across many collection types?

SethTisue

SethTisue commented on May 6, 2020

@SethTisue
Member

the doc PR (scala/docs.scala-lang#1643) is now merged

SethTisue

SethTisue commented on May 6, 2020

@SethTisue
Member

ping @Ichoran about whether this is appropriate for scala-collection-laws?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lrytz@SethTisue@magnolia-k

        Issue actions

          Document and add tests: collection conversions of mutable create a copy · Issue #11872 · scala/bug