Correct inference of primitive operand type behind binary operation
This commit is contained in:
parent
07a34df18b
commit
38060567e8
2 changed files with 44 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue