April 20, 2011 [Issue 5867] New: Cannot put function attributes (const, pure, ...) on the right of an auto-return function | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5867 Summary: Cannot put function attributes (const, pure, ...) on the right of an auto-return function Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: kennytm@gmail.com --- Comment #0 from kennytm@gmail.com 2011-04-20 12:02:05 PDT --- Test case: ------------------------- auto f() pure { return 4; } void main() { assert(f() == 4); } ------------------------- As of 2.052 it raises the errors x.d(1): function declaration without return type. (Note that constructors are always named 'this') x.d(1): no identifier for declarator pure f() The error will not happen if the attribute 'pure' is put at the front (pure auto f() { ... }) or the exact return type is provided (int f() pure { ... }). Possibly the same issue as bug 4785. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 06, 2011 [Issue 5867] Cannot put function attributes (const, pure, ...) on the right of an auto-return function | ||||
---|---|---|---|---|
| ||||
Posted in reply to kennytm@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=5867 kennytm@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from kennytm@gmail.com 2011-05-06 01:59:06 PDT --- *** This issue has been marked as a duplicate of issue 4865 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation