Bug 10055 – Incorrect attribute merging in dtor/postblit building
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-10T00:42:00Z
Last change time
2013-05-10T12:30:16Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-05-10T00:42:05Z
This is very similar to bug 10053.
This code works with 2.062, but fails with git head.
struct S1
{
pure ~this() { }
}
struct S2
{
~this() { }
}
struct SX
{
S1 s1;
S2 s2;
}
Output:
Error: pure function 'test.SX.~this' cannot call impure function 'test.S2.~this'
Although this is not a regression, same issue exists in implicit postblit generation.
struct S1
{
pure this(this) { }
}
struct S2
{
pure this(this) { }
}
struct SX
{
S1 s1;
S2 s2;
}
void main() pure
{
SX sx1;
SX sx2 = sx1; // should succeed to compile, but doesn't
}