Summary: ICE with getMember on a unittest member
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-04-24 16:06:46 PDT ---
Minimized code:

class A {
        void f() {
        unittest {
void g(T)(T a)
        foreach (name; __traits(allMembers, T)) {
                pragma(msg, name);
                static if (__traits(compiles, &__traits(getMember, a, name)))

Compiler output:
$ dmd -c bug.d
dmd: expression.c:6890: virtual Expression* DotVarExp::semantic(Scope*):
Assertion `type' failed.

Output from the pragma(msg,...) shows that the problem is triggered when
getMember is called with the name of a unittest. However, moving the body of
g() inside f() makes the problem go away, so there seems to be more to the
problem than just the fact that getMember was called with a unittest argument.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to