DMD doesn't force restrictions on foreach
According to the section "Foreach Restrictions" at
http://dlang.org/statement.html the following code
int[] a;
int[] b;
foreach (int i; a) {
a = null; // error
a.length += 10; // error
a = b; // error
}
a = null; // ok
should error.
But it doesn't for me when using 2.063.2 nor master.
Is this a regression bug?
No comments:
Post a Comment