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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 794593002: Allow dart2js to compile calls to type literals when prefixed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | tests/language/type_literal_prefix_call_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 137126a80a63653bb784249016a5ec2df5c87797..44a4796e3d212b54ec1301194c33b23cc10e243b 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -2788,6 +2788,12 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
} else {
// The node itself is not a constant but we register the selector (the
// identifier that refers to the class/typedef) as a constant.
+ if (node.receiver != null) {
+ // This is a hack for the case of prefix.Type, we need to store
+ // the element on the receiver, so [analyzeConstant] can build
+ // the type literal from the receiver.
Johnni Winther 2014/12/11 13:12:07 'receiver' -> 'selector' x2
sigurdm 2014/12/11 13:31:55 Tak
+ registry.useElement(node.selector, target);
+ }
analyzeConstantDeferred(node.selector);
}
}
« no previous file with comments | « no previous file | tests/language/type_literal_prefix_call_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698