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

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

Issue 2514353005: Add support for "??" to summaries. (Closed)
Patch Set: Created 4 years, 1 month 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 4662be8c31962fee69c0f916ebfc018185e39408..f7e6911352860daa7af3f0640de86d39da73baa5 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -486,6 +486,8 @@ abstract class AbstractConstExprSerializer {
operations.add(UnlinkedExprOperation.lessEqual);
} else if (operator == TokenType.PERCENT) {
operations.add(UnlinkedExprOperation.modulo);
+ } else if (operator == TokenType.QUESTION_QUESTION) {
+ operations.add(UnlinkedExprOperation.ifNull);
} else {
throw new StateError('Unknown operator: $operator');
}

Powered by Google App Engine
This is Rietveld 408576698