You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
```@safe:struct T { int* a,b,c; }void bar(void[24]);void gee(void*);void test() { static T t; gee(&t); // no error bar(cast(void[24])t); // cast from `T` to `void[24]` not allowed in safe code}```
Both should be allowed or both should error.
The text was updated successfully, but these errors were encountered:
Due to placement new, I'm on the side of disallowing conversion to ``void*`` and ``void[]`` in ``@safe``.
We have been relying on a language feature like that not existing and it opens up a major can of worms to have it.
Related: https://issues.dlang.org/show_bug.cgi?id=24772
Walter Bright reported this on 2024-11-18T18:36:48Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=24866
CC List
Description
The text was updated successfully, but these errors were encountered: