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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart

Issue 469903002: Added a test for dump-info with lots of closures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rename variables to make the test easier to read Created 6 years, 4 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: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
index d7375f66a2b2358fd66003d7bf6c797eb2ec6d2e..8991331f088b409f67343351abd6e2fbc7ec34dc 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
@@ -1127,6 +1127,11 @@ class TypeGraphInferrer implements TypesInferrer {
// The inferrer stores the return type for a function, so we have to
// be careful to not return it here.
if (element is FunctionElement) return compiler.typesTask.functionType;
+
+ // If the inferrer is null, that means that this TypeGraphInferrer
+ // was not initialized by analyzing main. Nothing can be done in this
+ // case, so return null indicating that the type could not be inferred.
sra1 2014/08/13 21:45:26 When does this happen? When the input is has parse
Ty Overby (Google) 2014/08/13 22:00:31 This happens on otherwise perfectly behaving code
sra1 2014/08/13 22:16:27 So TypeGraphInferer.analyzeMain is not called, but
+ if (inferrer == null) return null;
return inferrer.types.getInferredTypeOf(element).type;
}

Powered by Google App Engine
This is Rietveld 408576698