Aladdin - Scala Bugtracking
[#979] project: api priority: high category: bug
submitter assigned to status date submitted
Sean Martin fixed 2007-03-06 12:46:02.0
subject immutable hashsets not really
code
object Main {
  def main(args : Array[String]) : Unit = {
    val st : collection.immutable.HashSet[String] =
collection.immutable.HashSet.empty;
    val k0 = (st + "a" + "b" + "c" + "d");
    Console.println("k0 = " + k0);
    Console.println("st = " + st);
  }
}

what happened
For me, running the program prints out:

k0 = Set(b, c, a, d)
st = Set(b, c, d)
what expected st should be empty,
[back to overview]
Changes of this bug report
Sean  edited on  2007-03-06 12:47:26.0
Martin  edited on  2007-03-06 18:56:11.0