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 ff7b30d7c1d1579daf2c1652d5f22d9c91600958..1e4e93f28827bc67c45af9eaac4260a33acbb1a1 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 |
@@ -90,6 +90,26 @@ class KernelAsExpression extends AsExpression implements KernelExpression { |
} |
} |
+/// Concrete shadow object representing an assertion statement in kernel form. |
+class KernelAssertStatement extends AssertStatement implements KernelStatement { |
+ KernelAssertStatement(Expression condition, |
+ {Expression message, int conditionStartOffset, int conditionEndOffset}) |
+ : super(condition, |
+ message: message, |
+ conditionStartOffset: conditionStartOffset, |
+ conditionEndOffset: conditionEndOffset); |
+ |
+ @override |
+ void _inferStatement(KernelTypeInferrer inferrer) { |
+ inferrer.listener.assertStatementEnter(this); |
+ inferrer.inferExpression(condition, null, false); |
+ if (message != null) { |
+ inferrer.inferExpression(message, null, false); |
+ } |
+ inferrer.listener.assertStatementExit(this); |
+ } |
+} |
+ |
/// Shadow object for [AwaitExpression]. |
class KernelAwaitExpression extends AwaitExpression |
implements KernelExpression { |