Index: pkg/compiler/lib/src/io/source_file.dart |
diff --git a/pkg/compiler/lib/src/io/source_file.dart b/pkg/compiler/lib/src/io/source_file.dart |
index b07672edcd33ddc21bd5d01196ac334c7ca2b4ab..f2058ad02caefcf1486c09f1aef0070a2a6db4ea 100644 |
--- a/pkg/compiler/lib/src/io/source_file.dart |
+++ b/pkg/compiler/lib/src/io/source_file.dart |
@@ -137,6 +137,11 @@ abstract class SourceFile implements LineColumnProvider { |
if (colorize == null) { |
colorize = (text) => text; |
} |
+ if (end > length) { |
ahe
2015/11/02 16:55:31
Add a TODO to turn this into an assertion. If you
ahe
2015/11/02 16:56:02
I meant to say: "consider adding a TODO..."
|
+ start = length - 1; |
+ end = length; |
+ } |
+ |
int lineStart = getLine(start); |
int columnStart = getColumn(lineStart, start); |
int lineEnd = getLine(end); |