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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.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 | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/front_end/testcases/inference/assert.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index 6a8e9e1a2a1e003efe092bff44b5b1e78b72d489..e7c14771223e7888abebdbc5479e212dde8e962d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -119,7 +119,8 @@ class KernelAssertStatement extends AssertStatement implements KernelStatement {
@override
void _inferStatement(KernelTypeInferrer inferrer) {
inferrer.listener.assertStatementEnter(this);
- inferrer.inferExpression(condition, null, false);
+ inferrer.inferExpression(
+ condition, inferrer.coreTypes.boolClass.rawType, false);
if (message != null) {
inferrer.inferExpression(message, null, false);
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/front_end/testcases/inference/assert.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698