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 51eae03565bd11dea569b18019811221035838fa..b72e47964986159be3b02dc0d15ef125e501db33 100644 |
--- a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart |
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart |
@@ -2142,6 +2142,66 @@ const Map<String, List<Test>> SEND_TESTS = const { |
error: MessageKind.NO_SUPER_IN_STATIC, |
index: '42', |
operator: '--')), |
+ const Test( |
+ ''' |
+ m() => [][42] ??= 0; |
+ ''', |
+ const Visit(VisitKind.VISIT_INDEX_SET_IF_NULL, |
+ receiver: '[] ', |
+ index: '42', |
+ rhs: '0')), |
+ const Test.clazz( |
+ ''' |
+ class B { |
+ operator [](_) => null; |
+ operator []=(a, b) {} |
+ } |
+ class C extends B { |
+ m() => super[42] ??= 0; |
+ } |
+ ''', |
+ const Visit(VisitKind.VISIT_SUPER_INDEX_SET_IF_NULL, |
+ getter: 'function(B#[])', |
+ setter: 'function(B#[]=)', |
+ index: '42', |
+ rhs: '0')), |
+ const Test.clazz( |
+ ''' |
+ class B { |
+ operator []=(a, b) {} |
+ } |
+ class C extends B { |
+ m() => super[42] ??= 0; |
+ } |
+ ''', |
+ const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_SET_IF_NULL, |
+ setter: 'function(B#[]=)', |
+ index: '42', |
+ rhs: '0')), |
+ const Test.clazz( |
+ ''' |
+ class B { |
+ operator [](_) => null; |
+ } |
+ class C extends B { |
+ m() => super[42] ??= 0; |
+ } |
+ ''', |
+ const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_INDEX_SET_IF_NULL, |
+ getter: 'function(B#[])', |
+ index: '42', |
+ rhs: '0')), |
+ const Test.clazz( |
+ ''' |
+ class B { |
+ } |
+ class C extends B { |
+ m() => super[42] ??= 0; |
+ } |
+ ''', |
+ const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_SET_IF_NULL, |
+ index: '42', |
+ rhs: '0')), |
], |
'Equals': const [ |
// Equals |