[Issue 4785] auto return of a function with in contract

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 30 10:32:55 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=4785


jens.k.mueller at gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jens.k.mueller at gmx.de
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #1 from jens.k.mueller at gmx.de 2011-03-30 10:29:23 PDT ---
I also hit this bug but on Linux and I suppose it fails on all platforms.

My test code is

auto foo()
body { // does not compile if body is specified
    return 0;
}

void main() {}

It fails with latest dmd (v2.052)
test.d(2): function declaration without return type. (Note that constructors
are always named 'this')
test.d(2): no identifier for declarator foo()

This bug makes using contracts and auto return type impossible. Maybe it's
importance should therefore be increased.

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


More information about the Digitalmars-d-bugs mailing list