[Issue 16115] [REG2.067] Wrong code with comma operator
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 27 00:46:22 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16115
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
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);
}
--
More information about the Digitalmars-d-bugs
mailing list