Skip to content

immutable.HashMap.size() can be induced to return -1 #768

Closed
@scabug

Description

@scabug

I'm using 2.7.1-RC1. this code:

val m = new collection.immutable.HashMap[Int,Int]
println(m.size)
m(1) = 1
println(m.size)

prints:

0
-1

shouldn't the -1 be 0?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions