[Issue 16115] New: [REG2.067] Wrong code with comma operator
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 2 08:04:08 PDT 2016
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: nobody at puremagic.com
Reporter: thecybershadow at gmail.com
///////////////// 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
--
More information about the Digitalmars-d-bugs
mailing list