www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21208] New: [ICE] dtoh with enums

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

          Issue ID: 21208
           Summary: [ICE] dtoh with enums
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greeenify gmail.com

```
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]

--
Aug 28 2020