D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21208 - [ICE] dtoh with enums
Summary: [ICE] dtoh with enums
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-08-28 19:46 UTC by Seb
Modified: 2020-08-30 14:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Seb 2020-08-28 19:46:32 UTC
```
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 Dlang Bot 2020-08-28 19:47:35 UTC
@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 Dlang Bot 2020-08-30 14:54:22 UTC
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