summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Symbols.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-02-05 11:31:35 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-02-05 12:27:57 +0100
commitb579a42ee3c079e9acf53b74085ae01ac6c35f0f (patch)
treec67100c6a6c4eba0d75ad8b36067b56af07fa356 /src/reflect/scala/reflect/internal/Symbols.scala
parent81d8f9d3da656cfb05f125ba7cf70ca51a477240 (diff)
downloadscala-b579a42ee3c079e9acf53b74085ae01ac6c35f0f.tar.gz
scala-b579a42ee3c079e9acf53b74085ae01ac6c35f0f.tar.bz2
scala-b579a42ee3c079e9acf53b74085ae01ac6c35f0f.zip
SI-6888 Loosen criteria for $outer search.
In order to cater for nested classes with names that end with '$', which lead to ambiguity when unmangling expanded names. In: class X { object $ } We end up with: orginalName(X$$$$$outer) = $$$outer This change modifies `outerSource` to consider that to be and outer accessor name. It is a piecemeal fix, and no doubt there are other nasty surprises in store for those inclined to flash their $$$ in identifier names, but the method changed is not used widely and this solves the reported problem. SI-2806 remains open to address the deeper problem.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Symbols.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 72ad84edec..4ffd198dc4 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -2515,7 +2515,9 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
}
override def outerSource: Symbol =
- if (originalName == nme.OUTER) initialize.referenced
+ // SI-6888 Approximate the name to workaround the deficiencies in `nme.originalName`
+ // in the face of clases named '$'. SI-2806 remains open to address the deeper problem.
+ if (originalName endsWith (nme.OUTER)) initialize.referenced
else NoSymbol
def setModuleClass(clazz: Symbol): TermSymbol = {