-
-
Notifications
You must be signed in to change notification settings - Fork 609
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 20989 - Checking array.ptr causes safety error ... #11337
Conversation
|
Thanks for your pull request and interest in making D better, @MoonlightSentinel! 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 "stable + dmd#11337" |
|
Nice! |
|
Sorry, little off-topic, this PR is nice but what has happened to our codecov check ? |
731cd82 to
9be38c9
Compare
It's still being pushed by the circleci pipeline. |
|
BTW, compiling pure unittest
{
int[] x;
assert(x.ptr);
}with Wouldn't it be nice to print the value of |
Indeed, thats why I've recently added support for unary expressions. It should be included in 2.093.0. |
... with -checkaction=context. Explicity flag `DotIdExpressions` as `noderef` because `_d_assert_fail` will not dereference the pointer and thus make the call `@safe`.
9be38c9 to
8591c1d
Compare
|
This is ready for another review. |
... with
-checkaction=context.Explicity flag
DotIdExpressionsasnoderefbecause_d_assert_failwill not dereference the pointer and thus make the call@safe.