November 09, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6915

           Summary: "pure" after template constraint too
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2011-11-08 19:23:08 PST ---
This is a correct D2 program:

int foo(T)(T x) pure nothrow if (is(T == int)) {
    return x;
}
void main() {
    foo(5);
}


I think tags like "pure" and "nothrow" (and @safe) should be accepted written after the template constraint too:


int foo(T)(T x) if (is(T == int)) pure nothrow {
    return x;
}
void main() {
    foo(5);
}


DMD 2.057head gives:

test5.d(1): semicolon expected following function declaration
test5.d(2): Declaration expected, not 'return'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6915


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich@gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-12-27 18:05:06 PST ---
*** This issue has been marked as a duplicate of issue 4946 ***

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