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

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

Issue 2900553003: Fix type inference of factory constructor invocations. (Closed)
Patch Set: Created 3 years, 7 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_ast_factory.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
index d22353601ffdf7de2c8324819140aaa7e8d7b48f..c521a54edc51f08739dea5030d5f839cbbb1f4d3 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_factory.dart
@@ -186,6 +186,10 @@ class KernelAstFactory implements AstFactory<VariableDeclaration> {
@override
StaticInvocation staticInvocation(Procedure target, Arguments arguments,
{bool isConst: false}) {
+ if (target.kind == ProcedureKind.Factory) {
+ return new KernelFactoryConstructorInvocation(target, arguments,
+ isConst: isConst);
+ }
return new KernelStaticInvocation(target, arguments, isConst: isConst);
}

Powered by Google App Engine
This is Rietveld 408576698