www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11668] New: "is" fails to catch errors in functions


           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 puremagic.com
        ReportedBy: samukha voliacable.com

--- Comment #0 from Max Samukha <samukha 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: -------
Dec 03 2013