Why is this an issue?

foreach loops are not allowed to have multidimensional brackets when declaring loop variables.

Even if most tools allow it, refrain from using this syntax to keep your code portable.

How to fix it

Code examples

Noncompliant code example

module top;
  int array[8][8];
  initial begin
    foreach (array[i]) begin
      foreach (array[i][j]) begin // Noncompliant
        array[i][j] = i * j;
      end
    end
  end
endmodule