www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22865] New: __traits(compiles) affects inferrence of attributes


          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: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

 safe unittest {
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.

Mar 09 2022