From e265373660e4727be6fcc6104d7a722ca662b53b Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 17 Sep 2015 13:32:51 +1000 Subject: SI-9473 Cleaner references to statically owned symbols Ever wonder why `identity("")` typechecks to `scala.this.Predef.identity("")`? It turns out that `mkAttributedRef` was importing `q"$scalaPackageClass.this.Predef._"` for all these years, rather than `q"$scalaModule.Predef._"`. This commit makes `mkAttributedRef` special case static owners by referring the the corresponding module, instead. --- test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala') diff --git a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala index f0f20acf07..365901c4d6 100644 --- a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala +++ b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala @@ -119,7 +119,9 @@ class SymbolTableForUnitTesting extends SymbolTable { } phasesArray } - lazy val treeInfo: scala.reflect.internal.TreeInfo{val global: SymbolTableForUnitTesting.this.type} = ??? + lazy val treeInfo = new scala.reflect.internal.TreeInfo { + val global: SymbolTableForUnitTesting.this.type = SymbolTableForUnitTesting.this + } val currentFreshNameCreator = new reflect.internal.util.FreshNameCreator -- cgit v1.2.3