digitalmars.D.bugs - [Issue 6915] New: "pure" after template constraint too
- d-bugmail puremagic.com (34/34) Nov 08 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6915
- d-bugmail puremagic.com (12/12) Dec 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6915
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 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: -------
Nov 08 2011
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 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: -------
Dec 27 2012