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 6f0141ed8f84319321b11c79e0d8ab3476178610..6a8e9e1a2a1e003efe092bff44b5b1e78b72d489 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,23 @@ class KernelAsExpression extends AsExpression implements KernelExpression { |
} |
} |
+/// Concrete shadow object representing an assert initializer in kernel form. |
+class KernelAssertInitializer extends LocalInitializer |
+ implements KernelInitializer { |
+ /// The assert statement performing the check |
+ AssertStatement _statement; |
+ |
+ KernelAssertInitializer(VariableDeclaration variable, this._statement) |
+ : super(variable); |
+ |
+ @override |
+ void _inferInitializer(KernelTypeInferrer inferrer) { |
+ inferrer.listener.assertInitializerEnter(this); |
+ inferrer.inferStatement(_statement); |
+ inferrer.listener.assertInitializerExit(this); |
+ } |
+} |
+ |
/// Concrete shadow object representing an assertion statement in kernel form. |
class KernelAssertStatement extends AssertStatement implements KernelStatement { |
KernelAssertStatement(Expression condition, |