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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart

Issue 2992263002: Implement type inference for super initializers. (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
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 ef96e93926947b22f5d4636df3b3db5c49bbe6d1..6f0141ed8f84319321b11c79e0d8ab3476178610 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
@@ -1806,6 +1806,22 @@ class KernelStringLiteral extends StringLiteral implements KernelExpression {
}
}
+/// Concrete shadow object representing a super initializer in kernel form.
+class KernelSuperInitializer extends SuperInitializer
+ implements KernelInitializer {
+ KernelSuperInitializer(Constructor target, Arguments arguments)
+ : super(target, arguments);
+
+ @override
+ void _inferInitializer(KernelTypeInferrer inferrer) {
+ inferrer.listener.superInitializerEnter(this);
+ inferrer.inferInvocation(null, false, fileOffset,
+ target.function.functionType, target.enclosingClass.thisType, arguments,
+ skipTypeArgumentInference: true);
+ inferrer.listener.superInitializerExit(this);
+ }
+}
+
/// Shadow object for [SuperMethodInvocation].
class KernelSuperMethodInvocation extends SuperMethodInvocation
implements KernelExpression {

Powered by Google App Engine
This is Rietveld 408576698