Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REG2.063a] Issue 10055 - Incorrect attribute merging in dtor/postblit building #2006

Merged
merged 4 commits into from
May 10, 2013

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented May 10, 2013

http://d.puremagic.com/issues/show_bug.cgi?id=10055

Implicitly generated destructors and postblits should have weaken attributes from field ones and explicitly defined ones.

Example:

struct S1 {
    this(this) pure {}   // p1
    ~this() @safe {}     // d1
}
struct S2 {
    S1 s1;
    this(this) @safe {}  // p2
    ~this() nothrow {}   // d2
    // Compiler will generate __aggrPostblit and __aggrDtor
    // for the whole S2 copy construction and destruction.
    // __aggrPostblit should have weaken attributes of
    //    (p1 + p2) == impure throwable @system
    // __aggrDtor should have weaken attributes of
    //    (d1 + d2) == impure throwable @system
}

9rnsr added 4 commits May 10, 2013 23:14
For:
1. Avoid "no line number" issues
2. For the DDMD automatic code translation to D
Collecting tests for struct destructor into same file is useful.
WalterBright added a commit that referenced this pull request May 10, 2013
[REG2.063a] Issue 10055 - Incorrect attribute merging in dtor/postblit building
@WalterBright WalterBright merged commit 43650b9 into dlang:master May 10, 2013
new IdentifierExp(0, Id::p));
ec = new AssignExp(loc,
new ThisExp(loc),
new IdentifierExp(loc, Id::p));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the above expressions now use the StructDeclaration location. Is that intended? May this cause issues with coverage analysis?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I opened #2021 for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants