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

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

Issue 1261623002: Add AccessSemantics.INVALID for invalid expressions. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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: pkg/compiler/lib/src/resolution/send_structure.dart
diff --git a/pkg/compiler/lib/src/resolution/send_structure.dart b/pkg/compiler/lib/src/resolution/send_structure.dart
index a64c2931ea32e33004877f464fae83afedd2e50c..e4aaee39742e66568ede7cec41c85c4a105a4cf7 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -373,6 +373,13 @@ class InvokeStructure<R, A> implements SendStructure<R, A> {
node.argumentsNode,
selector,
arg);
+ case AccessKind.INVALID:
+ return visitor.errorInvalidInvoke(
+ node,
+ semantics.element,
+ node.argumentsNode,
+ selector,
+ arg);
case AccessKind.COMPOUND:
// This is not a valid case.
break;
@@ -590,6 +597,11 @@ class GetStructure<R, A> implements SendStructure<R, A> {
node,
semantics.element,
arg);
+ case AccessKind.INVALID:
+ return visitor.errorInvalidGet(
+ node,
+ semantics.element,
+ arg);
case AccessKind.COMPOUND:
// This is not a valid case.
break;
@@ -793,6 +805,12 @@ class SetStructure<R, A> implements SendStructure<R, A> {
semantics.element,
node.arguments.single,
arg);
+ case AccessKind.INVALID:
+ return visitor.errorInvalidSet(
+ node,
+ semantics.element,
+ node.arguments.single,
+ arg);
case AccessKind.COMPOUND:
// This is not a valid case.
break;
@@ -1468,6 +1486,13 @@ class CompoundStructure<R, A> implements SendStructure<R, A> {
operator,
node.arguments.single,
arg);
+ case AccessKind.INVALID:
+ return visitor.errorInvalidCompound(
+ node,
+ semantics.element,
+ operator,
+ node.arguments.single,
+ arg);
case AccessKind.COMPOUND:
CompoundAccessSemantics compoundSemantics = semantics;
switch (compoundSemantics.compoundAccessKind) {
@@ -1871,6 +1896,12 @@ class PrefixStructure<R, A> implements SendStructure<R, A> {
semantics.element,
operator,
arg);
+ case AccessKind.INVALID:
+ return visitor.errorInvalidPrefix(
+ node,
+ semantics.element,
+ operator,
+ arg);
case AccessKind.COMPOUND:
CompoundAccessSemantics compoundSemantics = semantics;
switch (compoundSemantics.compoundAccessKind) {
@@ -2187,6 +2218,12 @@ class PostfixStructure<R, A> implements SendStructure<R, A> {
semantics.element,
operator,
arg);
+ case AccessKind.INVALID:
+ return visitor.errorInvalidPostfix(
+ node,
+ semantics.element,
+ operator,
+ arg);
case AccessKind.COMPOUND:
CompoundAccessSemantics compoundSemantics = semantics;
switch (compoundSemantics.compoundAccessKind) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart ('k') | pkg/compiler/lib/src/resolved_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698