Thread overview
[Issue 20347] Initialization of globals not checked for @safe, round 2
Dec 17, 2022
Iain Buclaw
Apr 18, 2023
RazvanN
Apr 18, 2023
Dennis
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=20347

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
April 18, 2023
https://issues.dlang.org/show_bug.cgi?id=20347

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

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

--- Comment #1 from RazvanN <razvan.nitu1305@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.

--
April 18, 2023
https://issues.dlang.org/show_bug.cgi?id=20347

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl

--- Comment #2 from Dennis <dkorpel@live.nl> ---
Yes, this was fixed by https://github.com/dlang/dmd/pull/14483 I forgot to link the issue

--