///////////////// test.d //////////////// int n; auto call() { // n = Test.tag; // Works return n = Test.tag, null; // Crash } struct Test { enum tag = 42; } void main() { call(); assert(n == 42); } ///////////////////////////////////////// Introduced in https://github.com/dlang/dmd/pull/3979
Clearer test case: int n; auto call() { version (none) // works { n = Test.tag; return null; } else // assert error { return n = Test.tag, null; } } struct Test { enum tag = 42; } void main() { call(); assert(n == 42); }
https://github.com/dlang/dmd/pull/6054
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f9fd81983118d94a6f3da915e781c72b54a67247 fix Issue 16115 - [REG2.067] Wrong code with comma operator https://github.com/dlang/dmd/commit/113e5f77d335dc3483127b13073690981b6a61b6 Merge pull request #6054 from WalterBright/fix16115 fix Issue 16115 - [REG2.067] Wrong code with comma operator
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f9fd81983118d94a6f3da915e781c72b54a67247 fix Issue 16115 - [REG2.067] Wrong code with comma operator https://github.com/dlang/dmd/commit/113e5f77d335dc3483127b13073690981b6a61b6 Merge pull request #6054 from WalterBright/fix16115