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

Unified Diff: tests/compiler/dart2js/semantic_visitor_test.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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | 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: tests/compiler/dart2js/semantic_visitor_test.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test.dart b/tests/compiler/dart2js/semantic_visitor_test.dart
index 2c4482ffe1e6a408b66aec48510d0b65388adfd7..382c1cf156943a1d0581178ddfd4a8c315060353 100644
--- a/tests/compiler/dart2js/semantic_visitor_test.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test.dart
@@ -46,6 +46,7 @@ class Visit {
final target;
final targetType;
final initializers;
+ final error;
const Visit(this.method,
{this.element,
@@ -67,7 +68,8 @@ class Visit {
this.body,
this.target,
this.targetType,
- this.initializers});
+ this.initializers,
+ this.error});
int get hashCode => toString().hashCode;
@@ -136,6 +138,9 @@ class Visit {
if (initializers != null) {
sb.write(',initializers=$initializers');
}
+ if (error != null) {
+ sb.write(',error=$error');
+ }
return sb.toString();
}
}
@@ -211,6 +216,12 @@ const List<VisitKind> UNTESTABLE_KINDS = const <VisitKind>[
// Constant expression are currently not computed during resolution.
VisitKind.VISIT_CONSTANT_GET,
VisitKind.VISIT_CONSTANT_INVOKE,
+ // TODO(johnniwinther): Test these when ResolverVisitor.visitSendSet has been
+ // rewritten.
+ VisitKind.ERROR_INVALID_SET,
+ VisitKind.ERROR_INVALID_PREFIX,
+ VisitKind.ERROR_INVALID_POSTFIX,
+ VisitKind.ERROR_INVALID_COMPOUND,
];
main(List<String> arguments) {
@@ -706,6 +717,12 @@ enum VisitKind {
ERROR_INVALID_ASSERT,
ERROR_UNDEFINED_UNARY_EXPRESSION,
ERROR_UNDEFINED_BINARY_EXPRESSION,
+ ERROR_INVALID_GET,
+ ERROR_INVALID_INVOKE,
+ ERROR_INVALID_SET,
+ ERROR_INVALID_PREFIX,
+ ERROR_INVALID_POSTFIX,
+ ERROR_INVALID_COMPOUND,
VISIT_CONSTANT_GET,
VISIT_CONSTANT_INVOKE,
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/semantic_visitor_test_send_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698