Open DavePearce opened 3 months ago
(see also #171)
The typing for Intrinsic::Mul seems off to me. Currently it is defined in common.rs like so:
Intrinsic::Mul
common.rs
pub fn typing(&self, argtype: &[Type]) -> Result<Type> { ... Intrinsic::Mul => argtype.iter().max().cloned().unwrap_or(Type::INFIMUM),
However, this implies that e.g. x * y has type i128 when x and y have type i128. That does not follow for me.
x * y
i128
x
y
At this stage, I'm not sure this is causing any actual problems.
This is right. This was written this way under the assumption that the constraint system is written in such a way that multiplication overflow would never deliberately occur, but that may not be valid anymore.
(see also #171)
The typing for
Intrinsic::Mul
seems off to me. Currently it is defined incommon.rs
like so:However, this implies that e.g.
x * y
has typei128
whenx
andy
have typei128
. That does not follow for me.At this stage, I'm not sure this is causing any actual problems.