[Issue 8665] auto function and implicit conversion in return statement corrupt returned value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 15 20:49:20 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8665
Jonathan M Davis <jmdavisProg at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jmdavisProg at gmx.com
--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-09-15 20:50:14 PDT ---
According to the spec, this code shouldn't compile in the first place, since
there are multiple types being returned. To quote the spec:
> If there are multiple ReturnStatements, the types of them must match exactly. If there are no ReturnStatements, the return type is inferred to be void.
So, depending on what's causing the corruption, it doesn't need to be fixed but
rather the compiler needs to be fixed so that it this example outright fails to
compile.
--
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