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

Unified Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 1133623002: Ensure that nulls aren't added to constant eval dependency graph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/constant.dart
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index effe860933982c5f07ee1a8b79d48ec8cd3bca94..b3d41078949be1f47eb86447d0b22bb13112331f 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -1198,6 +1198,7 @@ class ConstantValueComputer {
}
} else {
// Should not happen.
+ assert(false);
AnalysisEngine.instance.logger.logError(
"Constant value computer trying to compute the value of a node which is not a VariableDeclaration, InstanceCreationExpression, FormalParameter, or ConstructorDeclaration");
return;
@@ -4921,7 +4922,9 @@ class ReferenceFinder extends RecursiveAstVisitor<Object> {
if (constructor != null) {
ConstructorDeclaration declaration =
findConstructorDeclaration(constructor);
- _referenceGraph.addEdge(_source, declaration);
+ if (declaration != null) {
+ _referenceGraph.addEdge(_source, declaration);
+ }
}
}
return super.visitInstanceCreationExpression(node);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698