I changed something in my code to: bool foo() { return ( token.type == Type.Colon, // Typo: wanted logical operator instead of comma token.type == Type.Comma); } And I suddenly got this back from dmd: linkage = 0 Assertion failed: (0), function visit, file tocsym.c, line 246. dmd failed with exit code -6. In the function foo I wanted to type || instead of the comma. Regardless, it shouldn't fail with an assertion.
Complete test case: ---- enum Type {Colon, Comma} Type type; bool foo() { return type == Type.Colon, type == Type.Comma; } ---- Compiles with 2.068. Fails with ICE since 2.069.
https://github.com/dlang/dmd/pull/5774
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/dd3e980ca418b15d0e508ed3506276040f71e774 fix Issue 16022 - dmd assertion failure due to misplaced comma operator https://github.com/dlang/dmd/commit/35190b070e3dee5ba0ba07533a0a9f476b20ffa4 Merge pull request #5774 from 9rnsr/fix16022 [REG2.069] Issue 16022 - dmd assertion failure due to misplaced comma operator
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/dd3e980ca418b15d0e508ed3506276040f71e774 fix Issue 16022 - dmd assertion failure due to misplaced comma operator https://github.com/dlang/dmd/commit/35190b070e3dee5ba0ba07533a0a9f476b20ffa4 Merge pull request #5774 from 9rnsr/fix16022
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/64980c29006945d9b0a5abbe096edd2c92913584 Issue 16022 - assertion failure due to misplaced comma operator (additional test) https://github.com/dlang/dmd/commit/f6c2fbf2925326f47809eda4a999b8722d12d547 Merge pull request #7338 from JinShil/fix_16022 Issue 16022 - assertion failure due to misplaced comma operator (additional test) merged-on-behalf-of: Iain Buclaw <ibuclaw@gdcproject.org>
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/64980c29006945d9b0a5abbe096edd2c92913584 Issue 16022 - assertion failure due to misplaced comma operator (additional test) https://github.com/dlang/dmd/commit/f6c2fbf2925326f47809eda4a999b8722d12d547 Merge pull request #7338 from JinShil/fix_16022