[Issue 20347] Initialization of globals not checked for @safe, round 2

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 18 09:04:24 UTC 2023


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
Both cases seem to have been fixed.

For 1) I get:

test.d(2): Error: cast from `const(int)*` to `int*` not allowed in safe code

For 2) I get:

test.d(4): Error: `@safe` variable `y` cannot be initialized by calling
`@system` function `f`

Closing as WORKSFORME.

--


More information about the Digitalmars-d-bugs mailing list