Skip to content
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 22117 - Can't store scope pointer in a SumType #8208

Merged
merged 1 commit into from Aug 24, 2021

Conversation

pbackus
Copy link
Contributor

@pbackus pbackus commented Aug 23, 2021

Previously, the assignment of the local variable 'newStorage' to the
longer-lived member variable 'storage' caused scope inference to
(correctly) fail.

newStorage was necessary to work around issues 21229 and 22118. Since
those issues have been fixed, newStorage can be safely removed.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @pbackus! 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
22117 enhancement Can't store scope pointer in a SumType

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#8208"

@pbackus
Copy link
Contributor Author

pbackus commented Aug 24, 2021

Auto-tester failure is in druntime's forkgc2 test on 64-bit Darwin:

forkgc2(91895,0x700000104000) malloc: *** error for object 0x7fe3c3403130: double free

Probably a real bug worth investigating, but IMO it should not block this PR, so I'm force-pushing to restart the tests.

Previously, the assignment of the local variable 'newStorage' to the
longer-lived member variable 'storage' caused scope inference to
(correctly) fail.

newStorage was necessary to work around issues 21229 and 22118. Since
those issues have been fixed, newStorage can be safely removed.
@RazvanN7 RazvanN7 merged commit 12b78bd into dlang:master Aug 24, 2021
@pbackus pbackus deleted the fix-22117 branch August 24, 2021 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants