www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18830] New: Document Allowance for "new" with "scope" in


          Issue ID: 18830
           Summary: Document Allowance for "new" with "scope" in  nogc
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: madric gmail.com

For the description for  nogc functions as found here:

It is not indicated that "new" declarations may be compatible with " nogc"
functions provided that they are only used for "scope" variables.  The
following program compiles on the dlang.org website:

class Bob {
        int a;

void doThing()  nogc {
        scope auto b = new Bob();

void main() {

May 05 2018