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

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

Issue 2997513002: Use "bool" as the downward inference context for assert conditions. (Closed)
Patch Set: Created 3 years, 4 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/front_end/lib/src/fasta/kernel/kernel_shadow_ast.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 c3cb4e25f823bcf8b8dfcb53c19b12af1d474b0c..241d53009526d08ffb3173aa8b6ea8e4443a04f1 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -5195,8 +5195,16 @@ class ResolverVisitor extends ScopedVisitor {
return null;
}
+ @override
+ Object visitAssertInitializer(AssertInitializer node) {
+ InferenceContext.setType(node.condition, typeProvider.boolType);
+ super.visitAssertInitializer(node);
+ return null;
+ }
+
@override
Object visitAssertStatement(AssertStatement node) {
+ InferenceContext.setType(node.condition, typeProvider.boolType);
super.visitAssertStatement(node);
_propagateTrueState(node.condition);
return null;
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698