Chromium Code Reviews| 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 a292e28965ec15dd2291f0dd75cebf14faab630b..f0026a279e4b3788a4c72bf220aa10f8299c6daa 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; |
| @@ -679,6 +680,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: ' |
| @@ -1108,7 +1110,8 @@ 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())) { |
|
karlklose
2013/05/27 08:45:22
I think
!element.isLibrary() && !element.i
Johnni Winther
2013/05/27 11:01:23
Done.
|
| // 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 |