diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-30 16:23:11 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-12-01 09:31:13 +0100 |
commit | 47245f547f55df1feff9add1e8cd73edd8d0b154 (patch) | |
tree | 0bad23966dfaa8a7258b2d73a40a3a78658dc0ec /src/compiler/scala/tools/nsc/javac | |
parent | 08e717eaee731456a51adb08f72aa5d9f083a29a (diff) | |
download | scala-47245f547f55df1feff9add1e8cd73edd8d0b154.tar.gz scala-47245f547f55df1feff9add1e8cd73edd8d0b154.tar.bz2 scala-47245f547f55df1feff9add1e8cd73edd8d0b154.zip |
Remove Name -> TermName implicit.
And simplify the name implicits.
Diffstat (limited to 'src/compiler/scala/tools/nsc/javac')
-rw-r--r-- | src/compiler/scala/tools/nsc/javac/JavaParsers.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala index 73cbeaa6c4..f4c8cf991d 100644 --- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala +++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala @@ -125,7 +125,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners { def makeSyntheticParam(count: Int, tpt: Tree): ValDef = makeParam(nme.syntheticParamName(count), tpt) def makeParam(name: String, tpt: Tree): ValDef = - makeParam(newTypeName(name), tpt) + makeParam(name: TermName, tpt) def makeParam(name: TermName, tpt: Tree): ValDef = ValDef(Modifiers(Flags.JAVA | Flags.PARAM), name, tpt, EmptyTree) @@ -448,7 +448,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners { AppliedTypeTree(scalaDot(tpnme.JAVA_REPEATED_PARAM_CLASS_NAME), List(t)) } } - varDecl(in.currentPos, Modifiers(Flags.JAVA | Flags.PARAM), t, ident()) + varDecl(in.currentPos, Modifiers(Flags.JAVA | Flags.PARAM), t, ident().toTermName) } def optThrows() { @@ -542,7 +542,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners { * these potential definitions are real or not. */ def fieldDecls(pos: Position, mods: Modifiers, tpt: Tree, name: Name): List[Tree] = { - val buf = ListBuffer[Tree](varDecl(pos, mods, tpt, name)) + val buf = ListBuffer[Tree](varDecl(pos, mods, tpt, name.toTermName)) val maybe = new ListBuffer[Tree] // potential variable definitions. while (in.token == COMMA) { in.nextToken @@ -550,10 +550,10 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners { val name = ident() if (in.token == ASSIGN || in.token == SEMI) { // ... followed by a `=` or `;`, we know it's a real variable definition buf ++= maybe - buf += varDecl(in.currentPos, mods, tpt.duplicate, name) + buf += varDecl(in.currentPos, mods, tpt.duplicate, name.toTermName) maybe.clear() } else if (in.token == COMMA) { // ... if there's a comma after the ident, it could be a real vardef or not. - maybe += varDecl(in.currentPos, mods, tpt.duplicate, name) + maybe += varDecl(in.currentPos, mods, tpt.duplicate, name.toTermName) } else { // ... if there's something else we were still in the initializer of the // previous var def; skip to next comma or semicolon. skipTo(COMMA, SEMI) @@ -830,7 +830,7 @@ trait JavaParsers extends ast.parser.ParsersCommon with JavaScanners { // The STABLE flag is to signal to namer that this was read from a // java enum, and so should be given a Constant type (thereby making // it usable in annotations.) - ValDef(Modifiers(Flags.STABLE | Flags.JAVA | Flags.STATIC), name, enumType, blankExpr) + ValDef(Modifiers(Flags.STABLE | Flags.JAVA | Flags.STATIC), name.toTermName, enumType, blankExpr) } } |