summaryrefslogblamecommitdiff
path: root/test/files/run/bug2512.scala
blob: 514b26650f58184f2d4325e95e503d669d4b1a55 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                               
import scala.tools.nsc.util.HashSet

object Test
{
  val runs = 10000
  class Bop

  def main(args: Array[String]): Unit = {
    val set: HashSet[Bop] = new HashSet("Bop", 16)
    (1 to runs).toList foreach (_ => set addEntry new Bop)

    assert(runs == set.size && set.size == set.iterator.length)
  }
}