summaryrefslogtreecommitdiff
path: root/test/files/pos/t5580b.scala
blob: d5a4a0a2b2839072e65a34d38f80a76c8c899857 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/** It's a pos test because it does indeed compile,
 *  not so much because I'm glad it does.  Testing
 *  that error messages created and discarded during
 *  implicit search don't blow it up.
 */

import scala.collection.mutable.WeakHashMap
import scala.collection.JavaConversions._

class bar { }

class foo {
  val map = WeakHashMap[AnyRef, collection.mutable.Map[bar, collection.mutable.Set[bar]]]()

  def test={
    val tmp:bar=null
    if (map.get(tmp).isEmpty) map.put(tmp,collection.mutable.Set())
  }
}