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

          Issue ID: 22865
           Summary: __traits(compiles) affects inferrence of attributes
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

```
@safe unittest {
    foo();
}
auto foo() {
    immutable(ubyte)[] data;
    enum bar = __traits(compiles, cast(ubyte[])data);
}
```
Whether bar evaluates to true or false in this context I do not know. In either
case, it shouldn't directly affect whether or not @safe is inferred.

--

Reply via email to