summaryrefslogtreecommitdiff
path: root/test/files/neg/t5580b.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-04-04 13:53:00 -0700
committerPaul Phillips <paulp@improving.org>2013-04-05 10:35:01 -0700
commit684e87427850053db58707e2b7f3f51e10f882a0 (patch)
tree114058d79ad7641d970d0f503f73ca8f10c6c923 /test/files/neg/t5580b.scala
parent6bde11e531b32cc12b1185c5fe6a9135ab2a9b6b (diff)
downloadscala-684e87427850053db58707e2b7f3f51e10f882a0.tar.gz
scala-684e87427850053db58707e2b7f3f51e10f882a0.tar.bz2
scala-684e87427850053db58707e2b7f3f51e10f882a0.zip
Transcendent rewrite of isSameType.
A highly satisfying rewrite of isSameType. It's faster, clearer, shorter, better commented, and closer to correct. I am especially pleased that t5580b stopped compiling, given that nobody seemed to have much idea why it compiled in the first place.
Diffstat (limited to 'test/files/neg/t5580b.scala')
-rw-r--r--test/files/neg/t5580b.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/t5580b.scala b/test/files/neg/t5580b.scala
new file mode 100644
index 0000000000..2161da4584
--- /dev/null
+++ b/test/files/neg/t5580b.scala
@@ -0,0 +1,13 @@
+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())
+ }
+}