Example code:
```
@safe:
class S
{
string str;
}
void main()
{
auto s = S.init.tupleof;
}
```
Comment #1 by dkorpel — 2022-06-21T11:48:44Z
S.init is `null`, which you dereference by accessing a member. `@safe` does not prevent `null` dereferences, since those only abort the program, they don't corrupt memory. The code is essentially doing this:
```
auto s = (cast(S)null).str;
```
Changing this to an enhancement.
Comment #2 by robert.schadek — 2024-12-13T19:23:30Z