On Wed, 20 Aug 2014 16:34:40 +0000 via Digitalmars-d <[email protected]> wrote:
> No, the type of (cond ? x : 42) is always `int`, the `ref` > already gets lost inside the ternary operator. So in this case, > it behaves correctly. it's slightly counterintuitive. yes, this is correct, but D already complains on things like (a&b == c), so it can complain on such returns too -- just to avoid disambiguation. something like "use return cast(int)".
signature.asc
Description: PGP signature
