@RazvanN7 created dlang/dmd pull request #9428 " Fix Issue 19645 - Default parameters not checked for @safe" fixing this issue:
- Fix Issue 19645
- Fix Issue 19645
- Fix Issue 19645 - Default parameters not checked for @safe
https://github.com/dlang/dmd/pull/9428
Comment #5 by bugzilla — 2019-03-20T21:03:52Z
To be specific:
-----
module m;
shared int b;
pure void g(int a=b){}
-----
import m;
int b;
pure void f()
{
g();
}
-----
should be compiled as if written:
-----
module m;
shared int b;
pure void g(int a=b){}
-----
import m;
int b;
pure void f()
{
g(m.b); // pick m.b, not local b
}
-----
Comment #6 by dlang-bot — 2019-03-20T22:03:18Z
@WalterBright created dlang/dlang.org pull request #2607 "fix Issue 19645 - Default parameters not checked for @safe" fixing this issue:
- fix Issue 19645 - Default parameters not checked for @safe
https://github.com/dlang/dlang.org/pull/2607
dlang/dlang.org pull request #2607 "Function Default Parameters are underspecified" was merged into master:
- 9100e8d3630f1f533167467989104f3f86846474 by Walter Bright:
fix Issue 19645 - Default parameters not checked for @safe
https://github.com/dlang/dlang.org/pull/2607
Comment #9 by ag0aep6g — 2019-03-22T01:12:00Z
Reopening. Walter's spec fix was merged, but that doesn't fix the issue in DMD.
Comment #10 by john.michael.hall — 2020-04-08T20:58:16Z
*** Issue 20726 has been marked as a duplicate of this issue. ***
Comment #11 by john.michael.hall — 2020-04-08T21:00:23Z