@@ -779,11 +779,6 @@ argument_value
779
779
780
780
// Source: §12.8.1 General
781
781
primary_expression
782
- : primary_no_array_creation_expression
783
- | array_creation_expression
784
- ;
785
-
786
- primary_no_array_creation_expression
787
782
: literal
788
783
| interpolated_string_expression
789
784
| simple_name
@@ -799,6 +794,7 @@ primary_no_array_creation_expression
799
794
| post_increment_expression
800
795
| post_decrement_expression
801
796
| null_forgiving_expression
797
+ | array_creation_expression
802
798
| object_creation_expression
803
799
| delegate_creation_expression
804
800
| anonymous_object_creation_expression
@@ -1007,12 +1003,12 @@ null_conditional_invocation_expression
1007
1003
1008
1004
// Source: §12.8.12.1 General
1009
1005
element_access
1010
- : primary_no_array_creation_expression '[' argument_list ']'
1006
+ : primary_expression '[' argument_list ']'
1011
1007
;
1012
1008
1013
1009
// Source: §12.8.13 Null Conditional Element Access
1014
1010
null_conditional_element_access
1015
- : primary_no_array_creation_expression '?' '[' argument_list ']'
1011
+ : primary_expression '?' '[' argument_list ']'
1016
1012
(null_forgiving_operator? dependent_access)*
1017
1013
;
1018
1014
@@ -2730,7 +2726,7 @@ pointer_member_access
2730
2726
2731
2727
// Source: §23.6.4 Pointer element access
2732
2728
pointer_element_access
2733
- : primary_no_array_creation_expression '[' expression ']'
2729
+ : primary_expression '[' expression ']'
2734
2730
;
2735
2731
2736
2732
// Source: §23.6.5 The address-of operator
0 commit comments