gccrs
gccrs copied to clipboard
Different inference than rustc for integer
fn test_cast() {
let i = 1;
let j = i as i64;
}
rustc says that i is i32 and we say it is i64.
Awh thats horrible .... :( i wonder can we get away with this one.
In theory it could be a simple fix though, by default we always append the reference chain for all unifications so in this case we are doing:
let i = 1; let j = i as i64; // > = <?I> as <?I64>
So i think the reference chain gets appended to the i64 and thus it gets infered that way... that's a nasty one