| Index: pkg/compiler/lib/src/compiler.dart
|
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
|
| index 94b573a422ddc5cc9fcc449ebd2af964a4cd4c8f..ced831b979ee5db2b06257f609a25ff0828a1fd5 100644
|
| --- a/pkg/compiler/lib/src/compiler.dart
|
| +++ b/pkg/compiler/lib/src/compiler.dart
|
| @@ -1064,7 +1064,6 @@ abstract class Compiler implements LibraryLoaderListener {
|
| return const WorldImpact();
|
| }
|
| WorldImpact worldImpact = analyzeElement(element);
|
| - backend.onElementResolved(element);
|
| world.registerProcessedElement(element);
|
| return worldImpact;
|
| });
|
| @@ -1658,8 +1657,12 @@ class CompilerDiagnosticReporter extends DiagnosticReporter {
|
| if (astElement.hasNode) {
|
| Token from = astElement.node.getBeginToken();
|
| Token to = astElement.node.getEndToken();
|
| - if (astElement.metadata.isNotEmpty &&
|
| - astElement.metadata.first.hasNode) {
|
| + if (astElement.metadata.isNotEmpty) {
|
| + if (!astElement.metadata.first.hasNode) {
|
| + // We might try to report an error while parsing the metadata
|
| + // itself.
|
| + return true;
|
| + }
|
| from = astElement.metadata.first.node.getBeginToken();
|
| }
|
| return validateToken(from, to);
|
|
|