https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #1 from Илья Ярошенко ---
The last assert fails
--
https://issues.dlang.org/show_bug.cgi?id=21349
Paul Backus changed:
What|Removed |Added
CC||snarwin+bugzi...@gmail.com
Severity|
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #3 from Илья Ярошенко ---
well. The language spec is buggy.
--
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #4 from Илья Ярошенко ---
btw, I don't see whare spec says that an aggregate can't hold both old and new
style members
struct C
{
SOld sOld;
SNew sNew;
}
void main()
{
C c;
auto d = c;
assert(d.sOld.s);
assert(d.
https://issues.dlang.org/show_bug.cgi?id=21349
Илья Ярошенко changed:
What|Removed |Added
Severity|enhancement |blocker
--
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #5 from Paul Backus ---
When an aggregate has both old and new style members, the compiler generates
both a copy constructor and a postblit, and the postblit takes precedence.
I agree that this is a bug in the language design: the genera
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #6 from Илья Ярошенко ---
I have thought think about these lines
> For backward compatibility reasons, a struct that defines both a copy
> constructor and a postblit will only use the postblit for implicit copying.
What they are really
https://issues.dlang.org/show_bug.cgi?id=21349
RazvanN changed:
What|Removed |Added
CC||razvan.nitu1...@gmail.com
--- Comment #7 from Razv
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #8 from RazvanN ---
(In reply to Paul Backus from comment #5)
> When an aggregate has both old and new style members, the compiler generates
> both a copy constructor and a postblit, and the postblit takes precedence.
>
> I agree that th
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #9 from RazvanN ---
(In reply to Илья Ярошенко from comment #4)
> btw, I don't see whare spec says that an aggregate can't hold both old and
> new style members
>
> struct C
> {
> SOld sOld;
> SNew sNew;
> }
>
> void main()
> {
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #10 from RazvanN ---
(In reply to Paul Backus from comment #2)
> This is an enhancement request, not a bug. Per the language spec:
>
> > For backward compatibility reasons, a struct that defines both a copy
> > constructor and a postblit
https://issues.dlang.org/show_bug.cgi?id=21349
--- Comment #11 from RazvanN ---
I am inclined to close this as INVALID as the issue is easy to fix by disabling
the postblit in C, however, I am going to wait for further objections.
--
https://issues.dlang.org/show_bug.cgi?id=21349
RazvanN changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
13 matches
Mail list logo