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

          Issue ID: 24263
           Summary: -preview=bitfields: Bit field address escapes through
                    `ref`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

struct S {
    ubyte _x:4, _y:4;
    ubyte* p() => &_x;   // Error: cannot take address of bit-field `_x`
    ref ubyte x() => _x; // Compiles
}

--

Reply via email to