[Issue 10892] New: Compilation continues after static assert failing in templates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 25 14:37:59 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10892

           Summary: Compilation continues after static assert failing in
                    templates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: temtaime at gmail.com


--- Comment #0 from Temtaime <temtaime at gmail.com> 2013-08-25 14:37:59 PDT ---
template A() {
    static assert(false, `error`);
    enum A = A!();
}

void main() {
    enum B = A!();
}

Output:
Error: forward reference of variable A
Error: static assert  "error"
       instantiated from here: A!()

Expected output:
Error: static assert  "error"
       instantiated from here: A!()

If static assert fails and there is much code after it, it makes a trouble.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list