www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20722] New: typeid(X).initializer() breaks safety

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

          Issue ID: 20722
           Summary: typeid(X).initializer() breaks safety
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: safe
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: pro.mathias.lang gmail.com

```
import std.stdio;

void main ()  safe
{
    writeln(typeid(int).initializer());
}
```

SEGV because `initiializer` is ` trusted` and returns a slice of length 4 from
0x0 to 0x4.

--
Apr 06