summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-11-24 12:35:14 -0800
committerEugene Burmako <xeno.by@gmail.com>2012-11-24 12:35:14 -0800
commitc78d77c2b4b1927ce23314210a82b12046b47b01 (patch)
treedfd9c008124b086c6ff938a8bccab712728ddf1b /test
parent5b498a2612f967c944fa1ed4f63a09d6acc41791 (diff)
parentd0de367e72ba695777cfec31d796f5972ae18601 (diff)
downloadscala-c78d77c2b4b1927ce23314210a82b12046b47b01.tar.gz
scala-c78d77c2b4b1927ce23314210a82b12046b47b01.tar.bz2
scala-c78d77c2b4b1927ce23314210a82b12046b47b01.zip
Merge pull request #1662 from paulp/issue/6706
Fix for SI-6706, Symbol breakage under GC.
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t6706.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t6706.scala b/test/files/run/t6706.scala
new file mode 100644
index 0000000000..905494ca8d
--- /dev/null
+++ b/test/files/run/t6706.scala
@@ -0,0 +1,14 @@
+object Test {
+ var name = "foo" + 1
+ var s1 = Symbol(name)
+ s1 = null
+ System.gc
+ val s2 = Symbol("foo1")
+ name = null
+ System.gc
+ val s3 = Symbol("foo1")
+
+ def main(args: Array[String]): Unit = {
+ assert(s2 eq s3, ((s2, System.identityHashCode(s2), s3, System.identityHashCode(s3))))
+ }
+}