summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/javac
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-15 05:38:20 +0000
committerPaul Phillips <paulp@improving.org>2010-10-15 05:38:20 +0000
commitc5c38fc6420ce5a22448a2eeb3b45e1644358575 (patch)
treed6a7ed0994c407520e932e1fe3fe0aefdccc72ce /src/compiler/scala/tools/nsc/javac
parent185700607dc2fd12cf47a61f583bdbafd726558b (diff)
downloadscala-c5c38fc6420ce5a22448a2eeb3b45e1644358575.tar.gz
scala-c5c38fc6420ce5a22448a2eeb3b45e1644358575.tar.bz2
scala-c5c38fc6420ce5a22448a2eeb3b45e1644358575.zip
There was a fascinating tangle of name creation...
There was a fascinating tangle of name creation functions passing around positions only to reach the end of the line and discard the position since names don't have positions. I deleted all of it. The winner for most creative use of parameters was the freshName function in etaExpand, with this signature: def freshName(pos: util.Position, n: Int) And an implementation referencing neither pos nor n. "In a world beset by attrition on all sides... a people defeated by entropy... one man will show them the power of deletion." No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/javac')
-rw-r--r--src/compiler/scala/tools/nsc/javac/JavaParsers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
index 3c9cdbf878..8c0e5585be 100644
--- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
+++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala
@@ -22,7 +22,7 @@ trait JavaParsers extends JavaScanners {
class JavaUnitParser(val unit: global.CompilationUnit) extends JavaParser {
val in = new JavaUnitScanner(unit)
- def freshName(pos : Position, prefix : String) = unit.fresh.newName(pos, prefix)
+ def freshName(prefix : String) = unit.fresh.newName(prefix)
implicit def i2p(offset : Int) : Position = new OffsetPosition(unit.source, offset)
def warning(pos : Int, msg : String) : Unit = unit.warning(pos, msg)
def syntaxError(pos: Int, msg: String) : Unit = unit.error(pos, msg)
@@ -32,7 +32,7 @@ trait JavaParsers extends JavaScanners {
val in: JavaScanner
protected def posToReport: Int = in.currentPos
- protected def freshName(pos : Position, prefix : String): Name
+ protected def freshName(prefix : String): Name
protected implicit def i2p(offset : Int) : Position
private implicit def p2i(pos : Position): Int = if (pos.isDefined) pos.point else -1