Bug 21208 – [ICE] dtoh with enums

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-08-28T19:46:32Z
Last change time
2020-08-30T14:54:22Z
Keywords
pull
Assigned to
No Owner
Creator
Seb

Comments

Comment #0 by greeenify — 2020-08-28T19:46:32Z
``` enum a = [a: b]; ``` core.exception.AssertError@src/dmd/dtoh.d(1850): Assertion failure ---------------- ??:? _d_assertp [0x5621bd476dc1] src/dmd/dtoh.d:1850 _ZN11ToCppBuffer5visitEP10Expression [0x5621bd24cb7c] src/dmd/parsetimevisitor.d:183 _ZN16ParseTimeVisitorI10ASTCodegenE5visitEP20AssocArrayLiteralExp [0x5621bd32b912] src/dmd/expression.d:3035 _ZN20AssocArrayLiteralExp6acceptEP7Visitor [0x5621bd25a9d9] src/dmd/dtoh.d:702 _ZN11ToCppBuffer5visitEP14VarDeclaration [0x5621bd248ffd] src/dmd/declaration.d:1650 _ZN14VarDeclaration6acceptEP7Visitor [0x5621bd1de611] src/dmd/dtoh.d:546 _ZN11ToCppBuffer5visitEP6Module [0x5621bd248707] src/dmd/dmodule.d:1485 _ZN6Module6acceptEP7Visitor [0x5621bd2005f1] src/dmd/dtoh.d:243 _Z14genCppHdrFilesR5ArrayIP6ModuleE [0x5621bd247a92] src/dmd/mars.d:674 int dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) [0x5621bd2e91f8] src/dmd/mars.d:935 _Dmain [0x5621bd2ea26f]
Comment #1 by dlang-bot — 2020-08-28T19:47:35Z
@wilzbach created dlang/dmd pull request #11642 "Fix Issue 21208 - C/C++ header generation for {string,enum} enums" fixing this issue: - Fix Issue 21208 - C/C++ header generation for {string,enum} enums https://github.com/dlang/dmd/pull/11642
Comment #2 by dlang-bot — 2020-08-30T14:54:22Z
dlang/dmd pull request #11642 "Fix Issue 21208 - C/C++ header generation for {string,enum} enums" was merged into master: - e1f6bf0661b8badaf4f89eabf01872233eaa9ff4 by Sebastian Wilzbach: Fix Issue 21208 - C/C++ header generation for {string,enum} enums https://github.com/dlang/dmd/pull/11642