https://issues.dlang.org/show_bug.cgi?id=15681
--- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1d13794bc84a6af0d13f84a16baf6f881109668e fix Issue 15681 - Nested user type enum not retaining value properly 1. It was a bug in `createBlockDuplicatedArrayLiteral` function. On array literal construction, the element should be copied when the type has value semantics and the CTFE value has sub payload. 2. Also the `createBlockDuplicatedArrayLiteral` callers need to handle the `elem` argument ownership well. 2a. In `copyLiteral`, it didn't copy the source struct element on block assignment. 2b. In `recursivelyCreateArrayLiteral`, the `elemType.defaultInitLiteral(loc)` is not yet CTFE-ed expression. So it should be interpreted to copy it into CTFE world. https://github.com/D-Programming-Language/dmd/commit/21c35b077388429de36f6f8d63063d4a6a35facd Merge pull request #5462 from 9rnsr/fix15681 [REG2.067] Issue 15681 - Nested user type enum not retaining value properly --