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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 16549004: Add type arguments to constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 6 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/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 66f97f43cbcb1d81033b7101c7db17f374d42ea6..3d90f474348329da6ae6dbf1fa1eb2239fd5aa41 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -1253,6 +1253,19 @@ class FunctionElementX extends ElementX implements FunctionElement {
return target;
}
+ InterfaceType computeTargetType(Compiler compiler,
+ InterfaceType newType) {
+ if (!isRedirectingFactory) return newType;
+ ClassElement targetClass = getEnclosingClass();
+ TreeElements treeElements =
+ compiler.enqueuer.resolution.getCachedElements(
+ declaration);
+ FunctionExpression functionNode = parseNode(compiler);
+ Return redirectionNode = functionNode.body;
+ return treeElements.getType(redirectionNode.expression)
+ .subst(newType.typeArguments, targetClass.typeVariables);
+ }
+
/**
* Applies a patch function to this function. The patch function's body
* is used as replacement when parsing this function's body.

Powered by Google App Engine
This is Rietveld 408576698