diff options
author | Martin Odersky <odersky@gmail.com> | 2013-06-06 19:20:41 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-06-06 19:20:41 +0200 |
commit | 1571ec5f39cacac6433cce0a140ebfb18e2ac314 (patch) | |
tree | bb27d85d7ef2e07a06805bc443795c56e9e1f1f6 /src/dotty/tools/dotc/util/Positions.scala | |
parent | 5651846489834ed69cbb2dab88bc628cf6234dc9 (diff) | |
download | dotty-1571ec5f39cacac6433cce0a140ebfb18e2ac314.tar.gz dotty-1571ec5f39cacac6433cce0a140ebfb18e2ac314.tar.bz2 dotty-1571ec5f39cacac6433cce0a140ebfb18e2ac314.zip |
Namer redesign.
A new design that relies on DefDef local maps, instead of global maps before.
Diffstat (limited to 'src/dotty/tools/dotc/util/Positions.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/Positions.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/util/Positions.scala b/src/dotty/tools/dotc/util/Positions.scala index 0a0a52e51..281540321 100644 --- a/src/dotty/tools/dotc/util/Positions.scala +++ b/src/dotty/tools/dotc/util/Positions.scala @@ -1,5 +1,6 @@ package dotty.tools.dotc package util +import language.implicitConversions /** Position format in little endian: * Start: unsigned 26 Bits (works for source files up to 64M) @@ -149,8 +150,8 @@ object Positions { } /** An index coordinate */ - def indexCoord(n: Int) = new Coord(n + 1) - def positionCoord(pos: Position) = new Coord(-(pos.point + 1)) + implicit def indexCoord(n: Int): Coord = new Coord(n + 1) + implicit def positionCoord(pos: Position): Coord = new Coord(-(pos.point + 1)) /** A sentinel for a missing coordinate */ val NoCoord = new Coord(0) |