www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17493] New: nothrow constructor may throw

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

          Issue ID: 17493
           Summary: nothrow constructor may throw
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

struct S {
    ~this() {}
  }

  class C {
    S s;

    this() nothrow {}
  }

produces:

  test.d(8): Error: destructor 'test.C.~this' is not nothrow
  test.d(8): Error: nothrow constructor 'test.C.this' may throw

Introduced by:

https://github.com/dlang/dmd/pull/6816

--
Jun 11