diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-27 18:23:07 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:11 +0200 |
commit | 21ab9a1355036aa953db4e1f87c8f0f9a06506b5 (patch) | |
tree | 3824573b541226f7e90609e7163383b471838667 /compiler/src/dotty/tools/dotc/core/NameOps.scala | |
parent | 0efd6b93cf45be4cb211093185fef2923f53ef67 (diff) | |
download | dotty-21ab9a1355036aa953db4e1f87c8f0f9a06506b5.tar.gz dotty-21ab9a1355036aa953db4e1f87c8f0f9a06506b5.tar.bz2 dotty-21ab9a1355036aa953db4e1f87c8f0f9a06506b5.zip |
Get rid of ExpandedName flag
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/NameOps.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/NameOps.scala b/compiler/src/dotty/tools/dotc/core/NameOps.scala index c837bc25c..f467fbcd5 100644 --- a/compiler/src/dotty/tools/dotc/core/NameOps.scala +++ b/compiler/src/dotty/tools/dotc/core/NameOps.scala @@ -138,7 +138,7 @@ object NameOps { /** The expanded name of `name` relative to given class `base`. */ def expandedName(base: Symbol, separator: Name)(implicit ctx: Context): N = - expandedName(if (base is Flags.ExpandedName) base.name else base.fullNameSeparated("$"), separator) + expandedName(if (base.name.is(ExpandedName)) base.name else base.fullNameSeparated("$"), separator) def expandedName(base: Symbol)(implicit ctx: Context): N = expandedName(base, nme.EXPAND_SEPARATOR) @@ -161,7 +161,7 @@ object NameOps { /** Revert the expanded name. */ def unexpandedName: N = likeTyped { - name.rewrite { case XpandedName(_, unexp) => unexp } + name.rewrite { case ExpandedName(_, unexp) => unexp } } def unexpandedNameOfMangled: N = likeTyped { @@ -175,8 +175,8 @@ object NameOps { if (idx < 0) name else (name drop (idx + nme.EXPAND_SEPARATOR.length)) } - def expandedPrefix: N = likeTyped { name.exclude(XpandedName) } - + def expandedPrefix: N = likeTyped { name.exclude(ExpandedName) } + def expandedPrefixOfMangled: N = { val idx = name.lastIndexOfSlice(nme.EXPAND_SEPARATOR) assert(idx >= 0) @@ -188,7 +188,7 @@ object NameOps { val unmangled = unexpandedNameOfMangled if (name eq unmangled) name else likeTyped( - XpandedName(expandedPrefixOfMangled.toTermName, unmangled.asSimpleName)) + ExpandedName(expandedPrefixOfMangled.toTermName, unmangled.asSimpleName)) } else name |