[Issue 14364] New: DMD should compile SDC test0167.d
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Mar 28 09:59:38 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14364
Issue ID: 14364
Summary: DMD should compile SDC test0167.d
Product: D
Version: unspecified
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: shammah.chancellor at gmail.com
```
> rdmd test0167.d
core.exception.AssertError at test0167.d(9): Assertion failure
```
```test0167.d
//T compiles:yes
//T has-passed:yes
//T retval:53
// Tests TernaryOperator
int main() {
int ret = 5;
ret += ((ret++ == 5) ? (ret += 3) : (ret -= 11)) + ret;
assert(ret == 23);
ret += ((ret-- == 22) ? (ret += 5) : (ret -= 7)) + ret;
assert(ret == 53);
return ret;
}
```
--
More information about the Digitalmars-d-bugs
mailing list