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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_const_expr.dart

Issue 2912843004: Fix an exception caused by incomplete input (issue 29687) (Closed)
Patch Set: Added test Created 3 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
Index: pkg/analyzer/lib/src/summary/summarize_const_expr.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index 6212f5d5d76e1f505e2872f71143f16807e545e7..85ff646bdeef1680e63299bc1bfec6b1fb33d078 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -286,6 +286,9 @@ abstract class AbstractConstExprSerializer {
}
void _pushInt(int value) {
+ if (value == null) {
+ value = 0;
scheglov 2017/05/30 17:25:18 This could be also. value ??= 0;
Brian Wilkerson 2017/05/30 17:38:45 Done
+ }
assert(value >= 0);
if (value >= 0x100000000) {
int numOfComponents = 0;

Powered by Google App Engine
This is Rietveld 408576698