[Issue 24867] Wrong deprecation warning of @system variable usage under CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 19 16:05:17 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24867
Dennis <dkorpel at live.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dkorpel at live.nl
--- Comment #3 from Dennis <dkorpel at live.nl> ---
Consider the same example with a different safety error, reading overlapped
pointers:
```
union Bar
{
string name;
int b;
}
static immutable Bar bar = Bar("foo");
@safe
void foo()
{
static assert(bar.name == "foo");
}
```
Do you consider this a bug as well, because in the current AST-interpreter CTFE
implementation, unions don't actually overlap?
CTFE should not be a separate language IMO. I don't like the disrepancies with
'runtime execution' that are already there, and I'd like to close the gap
rather than widen it.
--
More information about the Digitalmars-d-bugs
mailing list