3 ms·
Arithmetic is defined on range types. So day 30 + day 4 is 34, which if you then try to coerce into a day will throw an exception.
by MathMonkeyMan 2y ago
Arithmetic is defined on range types. So day 30 + day 4 is 34, which if you then try to coerce into a day will throw an exception.
- dragonwriter 2y agoAnd... So? It seems you are saying Day_type + Integer is Integer, and Integer (in general) cannot safely be coerced into Day_type and... that’s logically correct?
- MathMonkeyMan 2y ago`Day_type + Day_type` is also defined, and it overflows. That's like normal integers, and unlike enums.