grain icon indicating copy to clipboard operation
grain copied to clipboard

Pin Down Semantics of When Bitwise Operators Convert to/from Int32/Int64

Open peblair opened this issue 5 years ago • 2 comments

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.

peblair avatar Sep 12 '20 13:09 peblair

Did we fix this with custom operator definitions?

spotandjake avatar Apr 05 '24 20:04 spotandjake

No.

ospencer avatar Apr 05 '24 20:04 ospencer