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

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

Issue 1575173005: checking and inference of null coalescing operator, fixes #24564 and fixes #25387 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index f709d561fd01fbaee3309b95f92c615b2c09aeff..6d7f6e9f7d12da8f98ddc7679a1df603dd982192 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -8435,7 +8435,11 @@ class ResolverVisitor extends ScopedVisitor {
}
} else {
// TODO(leafp): Do downwards inference using the declared type
- // of the binary operator.
+ // of the binary operator for other cases.
+ if (operatorType == TokenType.QUESTION_QUESTION) {
+ InferenceContext.setTypeFromNode(leftOperand, node);
+ InferenceContext.setTypeFromNode(rightOperand, node);
+ }
safelyVisit(leftOperand);
safelyVisit(rightOperand);
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/static_type_analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698