diff options
author | Paul Phillips <paulp@improving.org> | 2009-08-21 17:42:43 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-08-21 17:42:43 +0000 |
commit | 7039772a3ae96fe79b1bbc5e55745a59080a5227 (patch) | |
tree | 4b9f1c7b7ef936a1a992257040134cf574fdd7b2 /src/compiler | |
parent | 4a1b8bcc729e7817aa4017a7494f2c61fd7b7a22 (diff) | |
download | scala-7039772a3ae96fe79b1bbc5e55745a59080a5227.tar.gz scala-7039772a3ae96fe79b1bbc5e55745a59080a5227.tar.bz2 scala-7039772a3ae96fe79b1bbc5e55745a59080a5227.zip |
Reverted r18344 as it is interacting badly with...
Reverted r18344 as it is interacting badly with package objects.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index b76f169552..e4696339bc 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -1051,24 +1051,8 @@ trait Symbols { /** Return every accessor of a primary constructor parameter in this case class */ - final def caseFieldAccessors: List[Symbol] = { - val allAccessors = info.decls.toList filter (_ hasFlag CASEACCESSOR) - - // if a case class has private fields, the accessors will come back in the wrong - // order unless we do some more work. See ticket #1373 and test bug1373.scala. - def findRightAccessor(cpa: Symbol) = { - val toFind = cpa.fullNameString + "$" - // def fail = throw new Error("Accessor for %s not found among %s".format(cpa.fullNameString, allAccessors)) - def isRightAccessor(s: Symbol) = - if (s hasFlag ACCESSOR) s.accessed.id == cpa.id - else s.fullNameString startsWith toFind - - if (cpa.isOuterAccessor || cpa.isOuterField) None - else allAccessors find isRightAccessor - } - - constrParamAccessors map findRightAccessor flatten - } + final def caseFieldAccessors: List[Symbol] = + info.decls.toList filter (sym => !(sym hasFlag PRIVATE) && sym.hasFlag(CASEACCESSOR)) final def constrParamAccessors: List[Symbol] = info.decls.toList filter (sym => !sym.isMethod && sym.hasFlag(PARAMACCESSOR)) |