summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-12-01 12:38:10 +0100
committerPaul Phillips <paulp@improving.org>2012-12-02 13:39:05 -0800
commitde6649439e39c1f656644ac090fc49a7a8f02340 (patch)
tree25639987d8bf130ee570269fc50f285240ccecf6 /src/compiler/scala/reflect/reify/codegen/GenSymbols.scala
parent47245f547f55df1feff9add1e8cd73edd8d0b154 (diff)
downloadscala-de6649439e39c1f656644ac090fc49a7a8f02340.tar.gz
scala-de6649439e39c1f656644ac090fc49a7a8f02340.tar.bz2
scala-de6649439e39c1f656644ac090fc49a7a8f02340.zip
Remove TermName -> String implicit.
These implicits were crutches going back to a much Stringier time. Of course "with great type safety comes great verbosity" and no doubt this could be cleaned up significantly further. At least the underpinnings are consistent now - the only implicits involving name should be String -> TypeName and String -> TermName.
Diffstat (limited to 'src/compiler/scala/reflect/reify/codegen/GenSymbols.scala')
-rw-r--r--src/compiler/scala/reflect/reify/codegen/GenSymbols.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala b/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala
index a8a066cd8a..731aab93b8 100644
--- a/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala
+++ b/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala
@@ -98,7 +98,7 @@ trait GenSymbols {
def reifyFreeTerm(binding: Tree): Tree =
reifyIntoSymtab(binding.symbol) { sym =>
if (reifyDebug) println("Free term" + (if (sym.isCapturedVariable) " (captured)" else "") + ": " + sym + "(" + sym.accurateKindString + ")")
- val name = newTermName(nme.REIFY_FREE_PREFIX + sym.name + (if (sym.isType) nme.REIFY_FREE_THIS_SUFFIX else ""))
+ val name = newTermName("" + nme.REIFY_FREE_PREFIX + sym.name + (if (sym.isType) nme.REIFY_FREE_THIS_SUFFIX else ""))
if (sym.isCapturedVariable) {
assert(binding.isInstanceOf[Ident], showRaw(binding))
val capturedBinding = referenceCapturedVariable(sym)
@@ -112,14 +112,14 @@ trait GenSymbols {
reifyIntoSymtab(binding.symbol) { sym =>
if (reifyDebug) println("Free type: %s (%s)".format(sym, sym.accurateKindString))
state.reificationIsConcrete = false
- val name = newTermName(nme.REIFY_FREE_PREFIX + sym.name)
+ val name: TermName = nme.REIFY_FREE_PREFIX append sym.name
Reification(name, binding, mirrorBuildCall(nme.newFreeType, reify(sym.name.toString), mirrorBuildCall(nme.flagsFromBits, reify(sym.flags)), reify(origin(sym))))
}
def reifySymDef(sym: Symbol): Tree =
reifyIntoSymtab(sym) { sym =>
if (reifyDebug) println("Sym def: %s (%s)".format(sym, sym.accurateKindString))
- val name = newTermName(nme.REIFY_SYMDEF_PREFIX + sym.name)
+ val name: TermName = nme.REIFY_SYMDEF_PREFIX append sym.name
def reifiedOwner = if (sym.owner.isLocatable) reify(sym.owner) else reifySymDef(sym.owner)
Reification(name, Ident(sym), mirrorBuildCall(nme.newNestedSymbol, reifiedOwner, reify(sym.name), reify(sym.pos), mirrorBuildCall(nme.flagsFromBits, reify(sym.flags)), reify(sym.isClass)))
}