Jonathan M Davis <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #25 from Jonathan M Davis <> 2012-10-12 19:42:37 
PDT ---
> trivially incorrect use of op assignment operator is allowed:

Your example is perfectly valid. D uses range value propagation:

It knows the value of both x and y, so it knows that x |= y; will work just
fine, because all of the values will fit in the correct types. If the value in
y was too large to fit in a ushort, _then_ it should give you an error, but
since it fits in a ushort just fine (and is positive, so there's no issues with
two's complement or whatnot), the compiler knows that it's fine and allows it
without complaint.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to