https://issues.dlang.org/show_bug.cgi?id=16115
Issue ID: 16115
Summary: [REG2.067] Wrong code with comma operator
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: wrong-code
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
///////////////// 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
--