http://d.puremagic.com/issues/show_bug.cgi?id=6202
Summary: Inferring function return type with attributes on both sides of signature Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@kyllingen.net --- Comment #0 from Lars T. Kyllingstad <bugzi...@kyllingen.net> 2011-06-23 13:18:39 PDT --- Test case: @property foo() pure { return 1; } Error: a.d(1): function declaration without return type. (Note that constructors are always named 'this') a.d(1): no identifier for declarator pure foo() Both '@property' and 'pure' can be exchanged for any of @safe, nothrow, const, etc. -- the point is that one attribute comes before the function signature and the other comes after. If 'pure' is removed, the return type is successfully inferred to be int. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------