[Issue 23785] New: [REG ] `-preview=in` crash when passing `enum` value at CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 16 21:08:15 UTC 2023


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

          Issue ID: 23785
           Summary: [REG ] `-preview=in` crash when passing `enum` value
                    at CTFE
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: pro.mathias.lang at gmail.com

```
struct BigInt { size_t[4] data; }
BigInt plusZero(in BigInt n) { return n; }
void testCTFEICE () @safe pure
{
    enum BigInt test1 = BigInt.init;
    enum BigInt test2 = plusZero(test1);
}
```

Triggers an ICE as of today.

--


More information about the Digitalmars-d-bugs mailing list