blob: 905494ca8dc11a7cbcd8ada43eb9fff3e0937c1b (
plain) (
tree)
|
|
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))))
}
}
|