summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/interactive/ContextTrees.scala2
-rw-r--r--src/compiler/scala/tools/nsc/util/Position.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/ContextTrees.scala b/src/compiler/scala/tools/nsc/interactive/ContextTrees.scala
index af50e4e468..1fad3180ab 100644
--- a/src/compiler/scala/tools/nsc/interactive/ContextTrees.scala
+++ b/src/compiler/scala/tools/nsc/interactive/ContextTrees.scala
@@ -46,7 +46,7 @@ trait ContextTrees { self: Global =>
if (contexts.isEmpty) None
else {
val hi = contexts.length - 1
- if ((contexts(hi).pos precedes pos) || (pos precedes contexts(0).pos)) None
+ if ((contexts(hi).pos properlyPrecedes pos) || (pos properlyPrecedes contexts(0).pos)) None
else {
def loop(lo: Int, hi: Int): Option[ContextTree] = {
val mid = (lo + hi) / 2
diff --git a/src/compiler/scala/tools/nsc/util/Position.scala b/src/compiler/scala/tools/nsc/util/Position.scala
index 8d0ff37c44..31202eec8f 100644
--- a/src/compiler/scala/tools/nsc/util/Position.scala
+++ b/src/compiler/scala/tools/nsc/util/Position.scala
@@ -154,7 +154,7 @@ trait Position {
* do not share a common point).
*/
def properlyPrecedes(pos: Position) =
- isDefined && pos.isDefined && startOrPoint < pos.endOrPoint
+ isDefined && pos.isDefined && endOrPoint < pos.startOrPoint
/** Does this position overlap with that position?
* This holds if both positions are ranges and there is an interval of