I thught we want to unify both methods, the usual fullName variant and the
one used for name mangling?


On Fri, Mar 29, 2013 at 2:43 PM, Paul Phillips <notifications@github.com>wrote:

> In src/reflect/scala/reflect/internal/Symbols.scala:
>
> > @@ -1033,16 +1033,21 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
> >       */
> >      final def fullName(separator: Char): String = fullNameAsName(separator).toString
> >
> > -    /** Doesn't drop package objects, for those situations (e.g. classloading)
> > -     *  where the true path is needed.
> > -     */
> > -    private def fullNameInternal(separator: Char): Name = (
> > -      if (isRoot || isRootPackage || this == NoSymbol) name
> > -      else if (owner.isEffectiveRoot) name
> > -      else ((effectiveOwner.enclClass.fullNameAsName(separator) append separator): Name) append name
> > -    )
> > +    def fullNameAsName(separator: Char, enclosure: Symbol => Symbol = (_.effectiveOwner.enclClass)): Name = {
>
> Both the default argument and the closure argument are unnecessary and
> serve to obscure the actual ways the method is used. Two variations do not
> a closure justify.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scala/scala/pull/2334/files#r3584553>
> .
>