-
-
Notifications
You must be signed in to change notification settings - Fork 610
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 16597 - deprecate shared as associative array storage class
#9366
Conversation
|
Thanks for your pull request and interest in making D better, @Basile-z! 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 fetch digger
dub run digger -- build "master + dmd#9366" |
|
Is this in the spec? |
|
Not to my knowledge. To be perfectly honest, this PR is naively motivated by a comment in the issue. |
| */ | ||
| // https://issues.dlang.org/show_bug.cgi?id=16597 | ||
| shared int[int] aa1; | ||
| shared(int[int]) aa2; |
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.
We should probably also disallow shared(V)[K], as I don't think the AA implementation takes any precautions to guard reads/writes of shared values. Can you add a test for this as well?
Co-Authored-By: Basile-z <16154339+Basile-z@users.noreply.github.com>
|
Sorry i don't feel it anymore. I keep the branch if some one wants to polish and is more convinced about the validity of this restriction. |
It's not possible to output directly an error because in theory it would be possible that someone uses a shared AA in combination with synchronization barriers, so instead encourage using
__gshared.