blob: 5903813ed17a759d4ac46556e766861d55f2e849 (
plain) (
tree)
|
|
/** This will run a a loooong time if Set's builder copies a
* complete new Set for every element.
*/
object Test {
def main(args: Array[String]): Unit = {
val a = new Array[Long](1000000)
(1 to 10000) foreach (i => a(i) = i)
val s = collection.mutable.Set(a: _*)
assert(s.sum > 0)
}
}
|