-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
Fix issue 13930, 19345 - Fix receiveOnly for non-assignable types
#7661
Conversation
|
Thanks for your pull request and interest in making D better, @tom-tan! 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 references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#7661" |
|
Looks all green this time, thanks! |
|
This might cause random segfaults: dlang/dmd#11868 (comment) From a quick glance, the |
|
This request uses
Do you have any ideas or thoughts? |
| else | ||
| { | ||
| import core.lifetime : emplace; | ||
| emplace(p, rhs); |
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.
AFAIK, this requires the type UT to feature a constructor taking a T rhs lvalue argument, and should thus be equivalent to auto p = new UT(rhs). - I think that's not suited in general and should probably be replaced by a manual copy-emplace as used for the T.sizeof <= size case above. It cheats around immutability by faking a copy-construct, performing a bitcopy and invoking the postblit if necessary. By the looks of it, it currently seems to ignore copy ctors...
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.
|
This PR introduced a regression: |
This is a re-submit version of #7655.