summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-01 22:46:59 +0000
committerPaul Phillips <paulp@improving.org>2011-01-01 22:46:59 +0000
commit533ffe9482c530489ad4f6670831b8d87f78193a (patch)
tree567660ba8ee7f97e283154acdb84e0215195d8ed /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent03f90c173445e5d988f2e2199026901b4def45b8 (diff)
downloadscala-533ffe9482c530489ad4f6670831b8d87f78193a.tar.gz
scala-533ffe9482c530489ad4f6670831b8d87f78193a.tar.bz2
scala-533ffe9482c530489ad4f6670831b8d87f78193a.zip
Removed the Name => TypeName implicit conversion.
questions start to arise as the ability to distinguish between type and term names becomes more fully realized: particularly that the ability to distinguish between TermSymbols and TypeSymbols has not come along with the names. In any case, this is more tedious than I might have anticipated but mostly because it's blazing a trail of typiness to ease the path for others. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 072bda9097..5e03c048c7 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -189,7 +189,7 @@ trait Namers { self: Analyzer =>
}
var pkg = owner.info.decls.lookup(pid.name)
if (!pkg.isPackage || owner != pkg.owner) {
- pkg = owner.newPackage(pos, pid.name)
+ pkg = owner.newPackage(pos, pid.name.toTermName)
pkg.moduleClass.setInfo(new PackageClassInfoType(new Scope, pkg.moduleClass))
pkg.setInfo(pkg.moduleClass.tpe)
enterInScope(pkg, owner.info.decls)
@@ -466,7 +466,7 @@ trait Namers { self: Analyzer =>
}
def enterNewMethod(tree: Tree, name: Name, flags: Long, mods: Modifiers, pos: Position): TermSymbol = {
- val sym = context.owner.newMethod(pos, name).setFlag(flags)
+ val sym = context.owner.newMethod(pos, name.toTermName).setFlag(flags)
setPrivateWithin(tree, sym, mods)
enterInScope(sym)
sym
@@ -504,7 +504,7 @@ trait Namers { self: Analyzer =>
val beanGetterDef = atPos(vd.pos.focus) {
DefDef(getterMods, getterName, Nil, List(Nil), tpt.duplicate,
if (mods.isDeferred) EmptyTree
- else Select(This(getter.owner.name), name)) }
+ else Select(This(getter.owner.name.toTypeName), name)) }
enterSyntheticSym(beanGetterDef)
if (mods.isMutable) {
@@ -1350,7 +1350,7 @@ trait Namers { self: Analyzer =>
if (member.hasAccessorFlag) {
if (member.isDeferred) {
val getter = if (member.isSetter) member.getter(member.owner) else member
- val result = getter.owner.newValue(getter.pos, getter.name)
+ val result = getter.owner.newValue(getter.pos, getter.name.toTermName)
.setInfo(getter.tpe.resultType)
.setFlag(DEFERRED)
if (getter.setter(member.owner) != NoSymbol) result.setFlag(MUTABLE)