diff options
Diffstat (limited to 'test/files/neg/t5580a.scala')
-rw-r--r-- | test/files/neg/t5580a.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t5580a.scala b/test/files/neg/t5580a.scala new file mode 100644 index 0000000000..742f0e85ea --- /dev/null +++ b/test/files/neg/t5580a.scala @@ -0,0 +1,11 @@ +import scala.collection.mutable.WeakHashMap + +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()) + } +} |