From 8c256077a7ec89d9bc49829b673150740024bba6 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 5 Feb 2014 13:19:04 +0100 Subject: SI-8030 Restore thread safety to the parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to the invariant "parsing doesn’t enter new symbols", which was respected and tested in 760df9843a910d6, we also must ensure that "parsing doesn't call Symbol#info". That happend indirectly if we call `companionModule`. This commit just converts the name of `class TupleN` to a term name, rather than getting the name of its companion. No test is included. This is tested upstream in: https://jenkins.scala-ide.org:8496/jenkins/view/Memory%20Leak%20Tests/job/scalac-memory-leaks-test-2.11.0/ --- src/reflect/scala/reflect/internal/TreeGen.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reflect/scala/reflect/internal/TreeGen.scala b/src/reflect/scala/reflect/internal/TreeGen.scala index 145b4a3f1f..29fdba2781 100644 --- a/src/reflect/scala/reflect/internal/TreeGen.scala +++ b/src/reflect/scala/reflect/internal/TreeGen.scala @@ -281,7 +281,7 @@ abstract class TreeGen extends macros.TreeBuilder { case tree :: Nil if flattenUnary => tree case _ => - Apply(scalaDot(TupleClass(elems.length).companionModule.name), elems) + Apply(scalaDot(TupleClass(elems.length).name.toTermName), elems) } def mkTupleType(elems: List[Tree], flattenUnary: Boolean = true): Tree = elems match { -- cgit v1.2.3