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 11048 - Default arguments bypass most attributes check (pure, @safe, @nogc) #14309

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jul 16, 2022

Variant on #14214 - this use of inlineCopy is exposing a hole in the @safe system.

Checking the testsuite first, then might fold the two together.

@dlang-bot
Copy link
Contributor

dlang-bot commented Jul 16, 2022

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
2437 normal ICE(tocsym.c, !needThis()) - default struct argument
2935 normal ICE(out.c) using struct with constructor as function default argument
11048 major Default arguments bypass most attributes check (pure, @safe, @nogc)
13442 minor __gshared default value allowed in @safe function signature

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 + dmd#14309"

@ibuclaw ibuclaw force-pushed the issue11048 branch 2 times, most recently from 2d8b2eb to a441b3b Compare July 16, 2022 09:48
@thewilsonator
Copy link
Contributor

This should definitely target stable

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 16, 2022

This should definitely target stable

This should definitely not.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 16, 2022

Hmm, test in issue 19645 because defaultArgSemantic eagerly folds away the cast expression.

This'll need a bit more plumbing to get right.

@dkorpel
Copy link
Contributor

dkorpel commented Oct 17, 2022

Are you still working on this @ibuclaw ?

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