digitalmars.D.bugs - [Issue 6202] New: Inferring function return type with attributes on both sides of signature
- d-bugmail puremagic.com (28/28) Jun 23 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6202
- d-bugmail puremagic.com (13/13) Jun 23 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6202
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: nobody puremagic.com ReportedBy: bugzilla kyllingen.net --- Comment #0 from Lars T. Kyllingstad <bugzilla 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: -------
Jun 23 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6202 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |INVALID --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2011-06-23 13:21:00 PDT --- Already fixed: https://github.com/D-Programming-Language/dmd/commit/6a15077f8189e1ef203565edaebc766446aa105b -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 23 2011