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

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: Address comments. Created 7 years, 8 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 9eed786f2c3068cd6b1905f924133cdde5fcf4c6..f0e8c7ff39edf2d1c486e8710674282319fe9aa5 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3357,6 +3357,9 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
}
+ if (constructor.isFactoryConstructor() && !type.typeArguments.isEmpty) {
+ compiler.enqueuer.codegen.registerFactoryWithTypeArguments(elements);
+ }
HType elementType = computeType(constructor);
HInstruction newInstance = new HInvokeStatic(inputs, elementType);
pushWithPosition(newInstance, node);

Powered by Google App Engine
This is Rietveld 408576698