Correct inference of primitive operand type behind binary operation

This commit is contained in:
varkor 2020-01-11 14:30:02 +00:00
parent 07a34df18b
commit 38060567e8
2 changed files with 44 additions and 10 deletions

View file

@ -0,0 +1,13 @@
// check-pass
fn main() {
let _: u8 = 0 + 0;
let _: u8 = 0 + &0;
let _: u8 = &0 + 0;
let _: u8 = &0 + &0;
let _: f32 = 0.0 + 0.0;
let _: f32 = 0.0 + &0.0;
let _: f32 = &0.0 + 0.0;
let _: f32 = &0.0 + &0.0;
}