diff options
Diffstat (limited to 'src/dotty/tools/dotc/util')
-rw-r--r-- | src/dotty/tools/dotc/util/Positions.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/util/Positions.scala b/src/dotty/tools/dotc/util/Positions.scala index 281540321..334a3deb6 100644 --- a/src/dotty/tools/dotc/util/Positions.scala +++ b/src/dotty/tools/dotc/util/Positions.scala @@ -49,6 +49,9 @@ object Positions { def pointDelta = (coords >>> (StartEndBits * 2)).toInt + def orElse(that: Position) = + if (this.exists) this else that + /** The union of two positions. This is the least range that encloses * both positions. It is always a synthetic position. */ |