[mcs] Disable more array interpolation on user code. Fixes #51166
[mono.git] / mcs / mcs / cs-parser.jay
index bb2bd6e19718cad38c3cf37e8eb131b1b6581685..a9748379086bbde75a62e2c78329576af82f3755 100644 (file)
@@ -3924,7 +3924,10 @@ array_creation_expression
                $$ = new ArrayCreation ((FullNamedExpression) $2, (List<Expression>) $4,
                                new ComposedTypeSpecifier (((List<Expression>) $4).Count, GetLocation ($3)) {
                                        Next = (ComposedTypeSpecifier) $6
-                               }, (ArrayInitializer) $7, GetLocation ($1));
+                               }, (ArrayInitializer) $7, GetLocation ($1)) {
+                       NoEmptyInterpolation = true
+               };
+
                lbag.AddLocation ($$, GetLocation ($3), GetLocation ($5));
          }
        | NEW new_expr_type rank_specifiers opt_array_initializer