diff options
author | Martin Odersky <odersky@gmail.com> | 2013-02-06 15:39:41 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-02-06 15:39:41 +0100 |
commit | 6aee0dcb43feb12984d65d198210b90f7704c3a4 (patch) | |
tree | b656dca2021183ab70695bd61a75bf43dd5a0cc0 /src/dotty/tools/dotc/core/NameOps.scala | |
parent | 4608c427eb27315b9cc073677e7280ba3384f564 (diff) | |
download | dotty-6aee0dcb43feb12984d65d198210b90f7704c3a4.tar.gz dotty-6aee0dcb43feb12984d65d198210b90f7704c3a4.tar.bz2 dotty-6aee0dcb43feb12984d65d198210b90f7704c3a4.zip |
Various additions and improvements, in preparation for addition of unpicklers.
Diffstat (limited to 'src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/NameOps.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala index 334d3a908..c422c4ec5 100644 --- a/src/dotty/tools/dotc/core/NameOps.scala +++ b/src/dotty/tools/dotc/core/NameOps.scala @@ -154,6 +154,11 @@ object NameOps { implicit class TypeNameDecorator(val name: TypeName) extends AnyVal { def isUnboxedName = Boxed contains name def boxedName: TypeName = Boxed(name) + + /** The expanded name of `name` relative to this class `base` with given `separator` + */ + def expandedName(base: Symbol, separator: Name = nme.EXPAND_SEPARATOR)(implicit ctx: Context): TypeName = + (base.fullName('$') ++ separator ++ name).toTypeName } implicit class TermNameDecorator(val name: TermName) extends AnyVal { |