Open
Description
Walter Bright reported this on 2024-11-18T18:36:48Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=24866
CC List
- Richard (Rikki) Andrew Cattermole
Description
```
@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.