Chromium Code Reviews| Index: lib/compiler/implementation/compiler.dart |
| diff --git a/lib/compiler/implementation/compiler.dart b/lib/compiler/implementation/compiler.dart |
| index 4c078eb2884bb28109d19d276b27e8ea7ca8d82b..4b7c16d15bd804275c908310eb6f6ddd924e316f 100644 |
| --- a/lib/compiler/implementation/compiler.dart |
| +++ b/lib/compiler/implementation/compiler.dart |
| @@ -937,7 +937,7 @@ class Compiler implements DiagnosticListener { |
| // URI. |
| throw 'Cannot find tokens to produce error message.'; |
| } |
| - if (uri === null) { |
| + if (uri === null && currentElement !== null) { |
| uri = currentElement.getCompilationUnit().script.uri; |
| } |
| return SourceSpan.withCharacterOffsets(begin, end, |
| @@ -1049,4 +1049,6 @@ class SourceSpan { |
| assert(endOffset >= beginOffset); |
| return f(beginOffset, endOffset); |
| } |
| + |
| + String toString() => 'SourceSpan($uri,$begin,$end)'; |
|
Bob Nystrom
2012/07/09 16:59:55
Spaces after ",".
Johnni Winther
2012/07/12 08:51:39
Done.
|
| } |