| Index: dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| index 99cfb248bfac316fb805738aad4873d7fedb17f1..2bcd622ae19e9f6c85abc026ffe58aa11ce810bd 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| @@ -805,7 +805,7 @@ abstract class Compiler implements DiagnosticListener {
|
| if (Elements.isErroneousElement(element)) {
|
| element = element.enclosingElement;
|
| }
|
| - if (element.position() == null) {
|
| + if (element.position() == null && !element.isCompilationUnit()) {
|
| // Sometimes, the backend fakes up elements that have no
|
| // position. So we use the enclosing element instead. It is
|
| // not a good error location, but cancel really is "internal
|
|
|