Bug 23785 – [REG ] `-preview=in` crash when passing `enum` value at CTFE

Status
NEW
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-03-16T21:08:15Z
Last change time
2024-12-13T19:27:50Z
Keywords
pull
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: dmd#18157 →

Comments

Comment #0 by pro.mathias.lang — 2023-03-16T21:08:15Z
``` 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.
Comment #1 by dlang-bot — 2023-03-16T21:09:57Z
@Geod24 created dlang/dmd pull request #14999 "Fix 23785: ICE with `-preview=in` when passing `enum` at CTFE" fixing this issue: - Fix 23785: ICE with `-preview=in` when passing `enum` at CTFE https://github.com/dlang/dmd/pull/14999
Comment #2 by robert.schadek — 2024-12-13T19:27:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18157 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB