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
Implement copy constructor #8688
Conversation
Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8688" |
Making the |
if (!einit) | ||
return setError(); | ||
|
||
Expression e; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insert a comment showing what expression is being built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the one on line 7742 enough?
{ | ||
if (!e2x.type.implicitConvTo(e1x.type)) | ||
{ | ||
exp.error("conversion error from `%s` to `%s`", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine this error message would be completely baffling to a user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there before. It has nothing to do with this PR
9b40369
to
59bf730
Compare
@jacob-carlborg I fixed the changelog and the inline comments. @wilzbach The only new thing added here is that the compiler inserts calls to the copy constructor where it used to insert for the postblit. This is tested. Moreover, there is a reference counted array implementation that uses the copy constructor and passes all the tests locally [1]. |
Changelog looks good, almost a bit too long. |
Changelog has been beefed up.
Failures seem unrelated, I'll pull the plug on this. |
This introduced a regression: https://issues.dlang.org/show_bug.cgi?id=22997 |
As per DIP: [1].
More tests will be added soon.
[1] dlang/DIPs#129