#1265 Handle implicit cast when short-circuiting ternary expression

closed
nobody
None
5
2013-03-24
2013-03-01
Martin Whitaker
No

This patch fixes an obscure corner case. If a ternary operation with mixed logic and real operands is short-circuited and the logic value is selected, that value
should be converted to a real value. In most cases this happens automatically when the result of the ternary operation is used, but this does not happen in the case that the result is used in a self-determined context.

1 Attachments

Discussion

  • Here is a regression test for the test suite. It requires no special compiler flags and is self-checking.

     
    Attachments
  • Applied to git master.

     
    • status: open --> closed