dmd
dmd copied to clipboard
fix Issue 11048 - Default arguments bypass most attributes check (pure, @safe, @nogc)
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.
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"
This should definitely target stable
This should definitely target stable
This should definitely not.
Hmm, test in issue 19645 because defaultArgSemantic eagerly folds away the cast expression.
This'll need a bit more plumbing to get right.
Are you still working on this @ibuclaw ?