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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 27 02:14:45 PDT 2014


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

bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc

--- Comment #2 from bearophile_hugs at eml.cc ---
(In reply to Kenji Hara from comment #1)
> 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

But isn't such usage of "scope" deprecated for D2?

--


More information about the Digitalmars-d-bugs mailing list