[Issue 11668] New: "is" fails to catch errors in functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 3 02:49:56 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11668

           Summary: "is" fails to catch errors in functions
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: samukha at voliacable.com


--- Comment #0 from Max Samukha <samukha at voliacable.com> 2013-12-03 02:49:54 PST ---
Current spec: "Type is the type being tested. It must be syntactically correct,
but it need not be semantically correct.".

template foo()
{
    static assert(false); // 1

    void bar()
    {
        static assert(false); // 2
    }
}   

enum x = is(foo!());

----

The original test case compiles without errors.

If (1) is commented out:
Error: static assert  (false) is false

If (2) is commented out, there is no error.

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


More information about the Digitalmars-d-bugs mailing list