reid-llvm/examples/custom_binop.reid

13 lines
215 B
Plaintext

// Arithmetic, function calls and imports!
impl binop (lhs: u16) + (rhs: u32) -> u32 {
return (lhs as u32) + rhs;
}
fn main() -> u32 {
let value = 6 as u16;
let other = 15 as u32;
return value + other;
}