Skip to content

Fix Issue 20182 - [REG 2.086.0] std.traits.ParameterDefaults fails for copy constructor of nested struct #8433

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

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

RazvanN7
Copy link
Collaborator

The body of the mixin does a copy initialization of the parameter. However, the copy constructor cannot be used with context pointers. This is a known issue: https://issues.dlang.org/show_bug.cgi?id=22239 .

However, this PR solves the issue by implementing a workaround that also might be a potential optimization.

@dlang-bot
Copy link
Contributor

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 verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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

Auto-close Bugzilla Severity Description
20182 regression [REG 2.086.0] std.traits.ParameterDefaults fails for copy constructor of nested struct

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

To target stable perform these two steps:

  1. Rebase your branch to upstream/stable:
git rebase --onto upstream/stable upstream/master
  1. Change the base branch of your PR to stable

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8433"

Copy link
Contributor

@dkorpel dkorpel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this targeting master again because it's related to other copy constructor fixes?

@thewilsonator
Copy link
Contributor

I suspect its because its old.

@dlang-bot dlang-bot merged commit d2c3da6 into dlang:master Apr 18, 2022
@RazvanN7
Copy link
Collaborator Author

@dkorpel Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants