diff options
Diffstat (limited to 'tests/run/t6706.scala')
-rw-r--r-- | tests/run/t6706.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/run/t6706.scala b/tests/run/t6706.scala new file mode 100644 index 000000000..905494ca8 --- /dev/null +++ b/tests/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)))) + } +} |