[Issue 22154] Pure functions should be able to use only the address of a global
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 29 04:48:54 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22154
--- Comment #5 from kinke <kinke at gmx.net> ---
(In reply to Nathan S. from comment #3)
> Putting the address in an enum appears to work:
Seems like a great way to violate purity:
pure int fun(int* x) {
enum int* addr = &a;
*addr = *x; // boom
return 42;
}
--
More information about the Digitalmars-d-bugs
mailing list