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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 13642002: Make sure required type arguments are given when using factories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index affa364be26d690b5c01e37606e214d2a02861f9..1776267d8b82b845ef33b7727b93166a6a9aafd2 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3317,6 +3317,9 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
}
+ if (constructor.isFactoryConstructor() && !type.typeArguments.isEmpty) {
+ compiler.enqueuer.codegen.registerFactoryWithTypeArguments();
+ }
HType elementType = computeType(constructor);
HInstruction newInstance = new HInvokeStatic(inputs, elementType);
pushWithPosition(newInstance, node);

Powered by Google App Engine
This is Rietveld 408576698