Skip to content

immutable.ArraySeq should not have "update" method #419

@xuwei-k

Description

@xuwei-k

not immutable 😇

Welcome to Scala 2.13.4 (OpenJDK 64-Bit Server VM, Java 1.8.0_275).
Type in expressions for evaluation. Or try :help.

scala> val a = new scala.collection.immutable.ArraySeq.ofInt(Array(1, 2, 3))
val a: collection.immutable.ArraySeq.ofInt = ArraySeq(1, 2, 3)

scala> a(0) = 10
       ^
       error: value update is not a member of collection.immutable.ArraySeq.ofInt
       did you mean updated?
Welcome to Scala 2.12.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_275).
Type in expressions for evaluation. Or try :help.

scala> import scala.collection.compat.immutable.ArraySeq
import scala.collection.compat.immutable.ArraySeq

scala> val a = new ArraySeq.ofInt(Array(1, 2, 3))
a: scala.collection.compat.immutable.ArraySeq.ofInt = ArraySeq(1, 2, 3)

scala> a(0) = 10

scala> a
res1: scala.collection.compat.immutable.ArraySeq.ofInt = ArraySeq(10, 2, 3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    backportBackport of changes from 2.13 to methods/classes already presentbugSomething isn't workinghelp wantedExtra attention is neededlibraryRelated to compat library code (not rewrite rules)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions