| Index: sdk/lib/_internal/compiler/implementation/compiler.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| index 1452eff873768f2ada6745a244b7e1629eb496ff..5afc41de52b0917dd90914622c35f5616d25a993 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
|
| @@ -318,6 +318,7 @@ abstract class Compiler implements DiagnosticListener {
|
| ClassElement typeClass;
|
| ClassElement mapClass;
|
| ClassElement symbolClass;
|
| + ClassElement stackTraceClass;
|
|
|
| // Initialized after mirrorSystemClass has been resolved.
|
| FunctionElement symbolConstructor;
|
| @@ -680,6 +681,7 @@ abstract class Compiler implements DiagnosticListener {
|
| listClass = lookupCoreClass('List');
|
| typeClass = lookupCoreClass('Type');
|
| mapClass = lookupCoreClass('Map');
|
| + stackTraceClass = lookupCoreClass('StackTrace');
|
| if (!missingCoreClasses.isEmpty) {
|
| internalErrorOnElement(coreLibrary,
|
| 'dart:core library does not contain required classes: '
|
| @@ -1109,7 +1111,9 @@ abstract class Compiler implements DiagnosticListener {
|
| if (Elements.isErroneousElement(element)) {
|
| element = element.enclosingElement;
|
| }
|
| - if (element.position() == null && !element.isCompilationUnit()) {
|
| + if (element.position() == null &&
|
| + !element.isLibrary() &&
|
| + !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
|
|
|