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

           Summary: DMD accepts function templates with no body.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-07-05 03:05:42 PDT ---
DMD compiles the following code without complaining:

int templateFunction(A, B)(A a, B b);

>From the spec: "FunctionLiterals and function templates, since their function
bodies are always present, infer the pure, nothrow, and @safe attributes unless
specifically overridden."

Either the complier or the spec is wrong. The current iteration of my grammar
does not allow function bodies to be missing, since as far as I know, empty
function templates are useless aside from forcing DDoc generation.

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

Reply via email to