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

Unified Diff: pkg/compiler/lib/src/inferrer/inferrer_visitor.dart

Issue 1939703002: Don't crash on deserialized type inference. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments + minor fix. Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
index 78ef6bb3c3a206fd60075ff8c4c0bda5471e227a..65e7439aa4e42047685a2d3700f80e9bd5c27c29 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
@@ -741,7 +741,10 @@ abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>>
: this.analyzedElement = analyzedElement,
this.locals = handler {
if (handler != null) return;
- Node node = analyzedElement.node;
+ Node node;
+ if (resolvedAst.kind == ResolvedAstKind.PARSED) {
+ node = resolvedAst.node;
+ }
FieldInitializationScope<T> fieldScope =
analyzedElement.isGenerativeConstructor
? new FieldInitializationScope<T>(types)
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698