Summary: invalid type accepted if evaluated while errors are
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Rainer Schuetze <> 2010-06-04 05:58:53 
PDT ---
The D2 code (tried with DMD 2.042 and 2.046):

static if(__traits(compiles,A.sizeof)) pragma(msg, "A.sizeof compiles!");

class A
    void foo(B b);

compiles without error with "dmd -c test.d" or even links if foo is made final.

This is caused by the error when evaluating B is muted while processing
__traits(compiles), but A is never revisited later.

A debug version of DMD outputs

ty = 37, '_error_'
assert glue.c(1059) 0

This can happen whenever globals.gag is non-zero, i.e. with speculative
semantic analysis.

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

Reply via email to