[Issue 2694] alias pure nothrow XXX; is not pure nothrow!

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 27 12:21:32 PDT 2009


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch, wrong-code


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2009-10-27 12:21:31 PDT ---
// PATCH: pure, nothrow need the same treatment which ref already has.

Index: declaration.c
===================================================================
--- declaration.c    (revision 221)
+++ declaration.c    (working copy)
@@ -461,11 +461,11 @@
     goto L2;            // it's a symbolic alias

 #if DMDV2
-    if (storage_class & STCref)
+    if (storage_class & (STCref | STCnothrow | STCpure))
     {    // For 'ref' to be attached to function types, and picked
     // up by Type::resolve(), it has to go into sc.
     sc = sc->push();
-    sc->stc |= STCref;
+    sc->stc |= (storage_class & (STCref | STCnothrow |STCpure));
     type->resolve(loc, sc, &e, &t, &s);
     sc = sc->pop();
     }

-- 
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