https://issues.dlang.org/show_bug.cgi?id=24867

Dennis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Dennis <[email protected]> ---
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.

--

Reply via email to