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

Nick Treleaven <[email protected]> changed:

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

--- Comment #3 from Nick Treleaven <[email protected]> ---
> depending on how exactly you interpret "create unsafe values", I guess my 
> `main` function may not violate requirement 2

I think dereferencing doesn't create an unsafe value, the static ctor created
an unsafe pointer, which in turn points to an unsafe value.

> clearly it violates requirement 1 and the preconditions hold (the 
> preconditions do not say anything about the state of global variables).

Yes, I think the preconditions need to mention safe context:

> When it is only called with safe values and safe aliasing

--

Reply via email to