@@ -149,14 +149,17 @@ object NameOps {
149149
150150 /** The expanded name of `name` relative to this class `base` with given `separator`
151151 */
152- def expandedName (base : Symbol , separator : Name = nme.EXPAND_SEPARATOR )(implicit ctx : Context ): N = {
153- val prefix = if (base is Flags .ExpandedName ) base.name else base.fullNameSeparated('$' )
154- name.fromName(prefix ++ separator ++ name).asInstanceOf [N ]
155- }
152+ def expandedName (base : Symbol )(implicit ctx : Context ): N =
153+ expandedName(if (base is Flags .ExpandedName ) base.name else base.fullNameSeparated('$' ))
154+
155+ /** The expanded name of `name` relative to `basename` with given `separator`
156+ */
157+ def expandedName (prefix : Name )(implicit ctx : Context ): N =
158+ name.fromName(prefix ++ nme.EXPAND_SEPARATOR ++ name).asInstanceOf [N ]
156159
157- def unexpandedName ( separator : Name = nme. EXPAND_SEPARATOR ) : N = {
158- val idx = name.lastIndexOfSlice(separator )
159- if (idx < 0 ) name else (name drop (idx + separator .length)).asInstanceOf [N ]
160+ def unexpandedName : N = {
161+ val idx = name.lastIndexOfSlice(nme. EXPAND_SEPARATOR )
162+ if (idx < 0 ) name else (name drop (idx + nme. EXPAND_SEPARATOR .length)).asInstanceOf [N ]
160163 }
161164
162165 def shadowedName : N = likeTyped(nme.SHADOWED ++ name)
@@ -289,11 +292,11 @@ object NameOps {
289292
290293 /** The name of an accessor for protected symbols. */
291294 def protectedAccessorName : TermName =
292- PROTECTED_PREFIX ++ name.unexpandedName()
295+ PROTECTED_PREFIX ++ name.unexpandedName
293296
294297 /** The name of a setter for protected symbols. Used for inherited Java fields. */
295298 def protectedSetterName : TermName =
296- PROTECTED_SET_PREFIX ++ name.unexpandedName()
299+ PROTECTED_SET_PREFIX ++ name.unexpandedName
297300
298301 def moduleVarName : TermName =
299302 name ++ MODULE_VAR_SUFFIX
0 commit comments