Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: pkg/compiler/lib/src/serialization/system.dart

Issue 2088233003: Serialize erroneous element and more (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/serialization/system.dart
diff --git a/pkg/compiler/lib/src/serialization/system.dart b/pkg/compiler/lib/src/serialization/system.dart
index 22ac66b5c247472a4daaa0d68e19768ad2e256be..5e2a24b35fcb2e055f5e6d72f9cdf6c551c9cf24 100644
--- a/pkg/compiler/lib/src/serialization/system.dart
+++ b/pkg/compiler/lib/src/serialization/system.dart
@@ -217,6 +217,7 @@ class ResolvedAstSerializerPlugin extends SerializerPlugin {
void onElement(Element element, ObjectEncoder createEncoder(String tag)) {
assert(invariant(element, element.isDeclaration,
message: "Element $element must be the declaration"));
+ if (element.isError) return;
if (element is MemberElement) {
assert(invariant(element, resolution.hasResolvedAst(element),
message: "Element $element must have a resolved ast"));
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | tests/compiler/dart2js/serialization/helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698