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

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: 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/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index 125a355bc9e374777be6d0cc40cb69092374fcd2..a63326ce77375a46bb3489500ac546057317288a 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() {
ahe 2013/04/04 18:43:31 Please pass in the TreeElements so we have a recor
karlklose 2013/04/08 09:45:12 Done.
+ universe.usingFactoryWithTypeArguments = true;
+ }
+
void registerAsCheck(DartType type, TreeElements elements) {
registerIsCheck(type, elements);
compiler.backend.registerAsCheck(type, elements);

Powered by Google App Engine
This is Rietveld 408576698