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

Unified Diff: tests/compiler/dart2js/semantic_visitor_test_send_data.dart

Issue 1294103004: Handle C?.m as C.m for Sends (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove unused method Created 5 years, 4 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/resolved_visitor.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/semantic_visitor_test_send_data.dart
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
index 34d25eae56c88771269f29e4ce1f59b3e7611a44..0419caed0e6a373d117acb4cf3ed9c61117acf3f 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
@@ -3824,15 +3824,9 @@ const Map<String, List<Test>> SEND_TESTS = const {
}
m(a) => C?.b;
''',
- const [
- const Visit(
- VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_GET,
- receiver: 'C',
- name: 'b'),
- const Visit(
- VisitKind.VISIT_CLASS_TYPE_LITERAL_GET,
- constant: 'C'),
- ]),
+ const Visit(
+ VisitKind.VISIT_STATIC_FIELD_GET,
+ element: 'field(C#b)')),
const Test(
'''
m(a) => a?.b = 42;
@@ -3930,5 +3924,12 @@ const Map<String, List<Test>> SEND_TESTS = const {
element: 'parameter(m#a)',
operator: '??=',
rhs: '42')),
+ const Test.prefix(
+ '''
+ var o;
+ ''',
+ 'm() => p?.o;',
+ const Visit(VisitKind.ERROR_INVALID_GET,
+ error: MessageKind.PREFIX_AS_EXPRESSION)),
],
};
« no previous file with comments | « pkg/compiler/lib/src/resolved_visitor.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698