D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3289 - ICE (..\ztc\cod4.c) when using a delegate inside a foreach
Summary: ICE (..\ztc\cod4.c) when using a delegate inside a foreach
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-09-03 13:07 UTC by Koroskin Denis
Modified: 2015-06-09 01:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Koroskin Denis 2009-09-03 13:07:21 UTC
Minimal testcase to reproduce:

struct Foo
{
    int i;
}

void main()
{
    Foo[] array;
    foreach (ref foo; array) {
        auto x = () {
            foo.i = 42;
        };
    }
}

Internal error: ..\ztc\cod4.c 354
Comment 1 Don 2009-09-07 03:05:45 UTC
Fixed DMD2.032.