[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #1 from Илья Ярошенко --- The last assert fails --

[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21349 Paul Backus changed: What|Removed |Added CC||snarwin+bugzi...@gmail.com Severity|

[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21349 --- Comment #3 from Илья Ярошенко --- well. The language spec is buggy. --

[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
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.

[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21349 Илья Ярошенко changed: What|Removed |Added Severity|enhancement |blocker --

[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
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

[Issue 21349] copy and postblit constructors aren't compatible

2020-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
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

[Issue 21349] copy and postblit constructors aren't compatible

2020-11-10 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21349 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #7 from Razv

[Issue 21349] copy and postblit constructors aren't compatible

2020-11-10 Thread d-bugmail--- via Digitalmars-d-bugs
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

[Issue 21349] copy and postblit constructors aren't compatible

2020-11-10 Thread d-bugmail--- via Digitalmars-d-bugs
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() > {

[Issue 21349] copy and postblit constructors aren't compatible

2020-11-10 Thread d-bugmail--- via Digitalmars-d-bugs
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

[Issue 21349] copy and postblit constructors aren't compatible

2020-11-10 Thread d-bugmail--- via Digitalmars-d-bugs
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. --

[Issue 21349] copy and postblit constructors aren't compatible

2020-11-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21349 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---