[Issue 3032] No stack allocation for "scope c = new class Object {};"

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 27 01:11:16 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=3032

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
           Hardware|x86                         |All
            Version|D1                          |D1 & D2
                 OS|Linux                       |All

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
In D2 git-head, @nogc attribute should accept such stack allocation of
anonymous class.

void foo() @nogc {
    scope bar = new class Object {}; // should be allowed
}

D2 fix:
https://github.com/D-Programming-Language/dmd/pull/3593

--


More information about the Digitalmars-d-bugs mailing list