[Issue 13531] Destructor attributes don't take member destructor attributes into account

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 13 03:20:01 PST 2014


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com
           Severity|normal                      |minor

--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
What's happening here is that there are actually two destructors for SS - the
one for the s field, and the ~this(). The compiler combines all such
destructors into one aggregate destructor. The aggregate destructor contains
the most permissive combination of the attributes of all the aggregated
destructors.

The error message is for the generated aggregated destructor.

Perhaps the error message could be better, but the feature is working as
designed.

Reducing this issue to minor as the only problem is the error message.

--


More information about the Digitalmars-d-bugs mailing list