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: [email protected]
          Reporter: [email protected]

```
> rdmd test0167.d
[email protected](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;
}
```

--

Reply via email to