[Issue 19258] New: Cannot @disable ~this()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 22 03:27:13 UTC 2018


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

          Issue ID: 19258
           Summary: Cannot @disable ~this()
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ilyayaroshenko at gmail.com

Fails:

struct S
{
    this(int i){}
    @disable ~this(){}
}

extern(C++) S foo()
{
    return S(3);
}

It should compiles because destructor is not called in `foo`.

--


More information about the Digitalmars-d-bugs mailing list