[Issue 4915] auto return type escapes function purity
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 8 17:44:57 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4915
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid, patch
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-11-08 17:43:54 PST ---
This patch also fixes bug 4640, bug 5006, and cases 2 and 3 of bug 3573.
PATCH: func.c, FuncDeclaration::semantic, line 164. All of the
function-related storage classes need to be applied to the function.
(Possibly STCsynchronised as well? Maybe there should be a #define which puts
all of these together, in case the relevant list gets longer).
if (!type->deco)
{
sc = sc->push();
- sc->stc |= storage_class & STCref; // forward to function type
+ sc->stc |= storage_class & (STCref | STCnothrow | STCpure | STCdisable
| STCproperty | STCsafe | STCtrusted | STCsystem); // forward to function
type
if (isCtorDeclaration())
sc->flags |= SCOPEctor;
--
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