Fix nested references to 'ref' foreach variables.

These "walk around" the array being iterated over, so they're a bit trickier
than other variables to get right.
This commit is contained in:
Frits van Bommel
2009-04-01 00:01:44 +02:00
parent aa8aad611c
commit 3f49ddb6d5
6 changed files with 68 additions and 17 deletions

View File

@@ -1 +1,8 @@
void foo() { void delegate()[] bar; try {} finally { foreach (dg; bar) dg(); } }
void foo() {
void delegate()[] bar;
try {
} finally {
foreach (dg; bar)
dg();
}
}