summaryrefslogtreecommitdiff
path: root/test/files/run/t5879.check
diff options
context:
space:
mode:
authorAleksandar Prokopec <axel22@gmail.com>2012-06-06 17:29:02 +0200
committerAleksandar Prokopec <axel22@gmail.com>2012-06-06 17:32:25 +0200
commit90cd1f9ccd272e436b23af70aa1465c673aab25e (patch)
treeff3fb6246ce15163e9e908b82a35bfa5964614dd /test/files/run/t5879.check
parentdb1b777372a6883f9c474159804b8f7798c0ec49 (diff)
downloadscala-90cd1f9ccd272e436b23af70aa1465c673aab25e.tar.gz
scala-90cd1f9ccd272e436b23af70aa1465c673aab25e.tar.bz2
scala-90cd1f9ccd272e436b23af70aa1465c673aab25e.zip
Fix SI-5879.
Fix a bug where a key in an immutable hash map have the corresponding value different in the iteration than when doing lookup. This use to happen after calling `merge`. Fix the order in which a key-value pair appears in the collision resolution function - the first argument always comes from the `this` hash map. Deprecate `merge` in favour of `merged`, as this is a pure method. As an added benefit, the syntax for invoking `merge` is now nicer.
Diffstat (limited to 'test/files/run/t5879.check')
-rw-r--r--test/files/run/t5879.check16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t5879.check b/test/files/run/t5879.check
new file mode 100644
index 0000000000..b6cbda35a7
--- /dev/null
+++ b/test/files/run/t5879.check
@@ -0,0 +1,16 @@
+Map(1 -> 1)
+1
+Map(1 -> 1)
+1
+(1,1)
+Map(1 -> 1)
+1
+(1,1)
+Map(1 -> 1)
+1
+(1,2)
+Map(1 -> 2)
+2
+(1,2)
+Map(1 -> 2)
+2 \ No newline at end of file