D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7160 - Regression(2.057): ICE(dsymbol.c:1052) ICE using __traits(derivedMembers)
Summary: Regression(2.057): ICE(dsymbol.c:1052) ICE using __traits(derivedMembers)
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 regression
Assignee: No Owner
URL:
Keywords: ice-on-valid-code, patch
: 7368 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-12-23 16:12 UTC by Robert Clipsham
Modified: 2012-01-26 05:59 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Robert Clipsham 2011-12-23 16:12:43 UTC
The following test case:
----
class HomeController {
    static if (false) {
        mixin(q{ int a; });
    }
    void foo() {
        foreach (m; __traits(derivedMembers, HomeController)) {
        }
    }
}
----
Gives the error:
----
dmd: dsymbol.c:1052: static int ScopeDsymbol::foreach(Dsymbols*, int (*)(void*, size_t, Dsymbol*), void*, size_t*): Assertion `members' failed.
----
On ubuntu 32 and a similar error:
----
Assertion failed: (members), function foreach, file dsymbol.c, line 1052.
----
On OS X 32 and 64.

This worked as expected in dmd 2.056.
Comment 3 Kenji Hara 2012-01-26 05:59:45 UTC
*** Issue 7368 has been marked as a duplicate of this issue. ***