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 20655 - attribute inference accepts unsafe union access as @safe #14827
Conversation
Thanks for your pull request and interest in making D better, @dkorpel! 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
|
50728b0
to
6131d0c
Compare
Well, that failed. :-) |
6131d0c
to
ecaeff9
Compare
0ccd876
to
36b88da
Compare
36b88da
to
ef5bdbe
Compare
ef5bdbe
to
b3e0053
Compare
b3e0053
to
f1e5b1a
Compare
It's now mostly working, but D-YAML, excel-d, taggedalgebraic, and serialized depend on inferred |
f1e5b1a
to
94def1b
Compare
8cab38b
to
753de6a
Compare
a2638a8
to
b006928
Compare
7192c43
to
a331584
Compare
a331584
to
f55247d
Compare
// To turn into an error, remove `isSafeBypassingInference` check in the | ||
// above if statement and remove the else branch | ||
sc.setUnsafePreview(FeatureState.default_, !printmsg, e.loc, | ||
"field `%s.%s` cannot access pointers in `@safe` code that overlap other fields", ad, v); |
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 error message isn't great. The field isn't the thing doing the access
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 isn't about the message
Reboot of #10884