grain
grain copied to clipboard
Pin Down Semantics of When Bitwise Operators Convert to/from Int32/Int64
Our bitwise operators work on all integral types (simple ints, Int64) in Grain. At the moment, they are implemented by converting the numbers to i64s, doing the operation, and converting back to the smallest possible integral type. This seems like it could lead into some weird semantic territory (and potential head-scratcher bugs), so we should decide more concretely when these type conversions are permitted.
Did we fix this with custom operator definitions?
No.