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

Unified Diff: sdk/lib/_internal/compiler/implementation/enqueue.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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 125a355bc9e374777be6d0cc40cb69092374fcd2..c6ea16a7705f3b34c12e3e36cfe8da3d63eef08e 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -386,6 +386,15 @@ abstract class Enqueuer {
compiler.backend.registerIsCheck(type, this, elements);
}
+ /**
+ * If a factory constructor is used with type arguments, we lose track
+ * which arguments could be used to create instances of classes that use their
+ * type variables as expressions, so we have to remember if we saw such a use.
+ */
+ void registerFactoryWithTypeArguments(TreeElements elements) {
+ universe.usingFactoryWithTypeArguments = true;
+ }
+
void registerAsCheck(DartType type, TreeElements elements) {
registerIsCheck(type, elements);
compiler.backend.registerAsCheck(type, elements);
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698