[Issue 19645] Default parameters not checked for @safe
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 20 21:03:52 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19645
--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> ---
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
}
-----
--
More information about the Digitalmars-d-bugs
mailing list