location: fix located_in behavior
authorAlexandre Terrasa <alexandre@moz-code.org>
Mon, 15 Jan 2018 20:38:03 +0000 (15:38 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Mon, 15 Jan 2018 20:38:39 +0000 (15:38 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/location.nit

index 36157d3..448d17d 100644 (file)
@@ -208,7 +208,7 @@ class Location
 
                if line_start == loc.line_start then
                        if column_start < loc.column_start then return false
-                       if column_start > loc.column_end then return false
+                       if line_start == loc.line_end and column_start > loc.column_end then return false
                end
 
                if line_end == loc.line_end and column_end > loc.column_end then return false