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

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

Issue 1449343003: Handle prefix as expression in SendSet. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/compiler/dart2js/semantic_visitor_test_send_data.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 acb0b986a1ce312a0dc2d24cc8cef3ca5eb6470c..6d41d9ca88a85d18c7cc521fe365a11563379717 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -3015,6 +3015,17 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
} else if (element.isTypeVariable) {
// `T = b`, `T++`, or 'T += b` where 'T' is a type variable.
return handleTypeVariableTypeLiteralUpdate(node, name, element);
+ } else if (element.isPrefix) {
+ // `p = b` where `p` is a prefix.
+ ErroneousElement error = reportAndCreateErroneousElement(
+ node,
+ name.text,
+ MessageKind.PREFIX_AS_EXPRESSION,
+ {'prefix': name},
+ isError: true);
+ registry.registerFeature(Feature.COMPILE_TIME_ERROR);
+ return handleUpdate(
+ node, name, new StaticAccess.invalid(error));
} else if (element.isLocal) {
return handleLocalUpdate(node, name, element);
} else if (element.isStatic || element.isTopLevel) {
« no previous file with comments | « no previous file | tests/compiler/dart2js/semantic_visitor_test_send_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698