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

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

Issue 2989193002: Prevent an exception (issue 30307) (Closed)
Patch Set: Created 3 years, 5 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/dart/constant/evaluation.dart
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 133ea4c321b232af719a3449bb58a3f4cdbf800f..9dc5c7e510c182f0aeba1ce28f2417a1d2bb7e39 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -591,7 +591,7 @@ class ConstantEvaluationEngine {
DartObjectImpl fieldValue;
if (strongMode) {
- fieldValue = field.constantInitializer.accept(fieldInitVisitor);
+ fieldValue = field.constantInitializer?.accept(fieldInitVisitor);
} else {
fieldValue = field.evaluationResult?.value;
}
« 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