reid-llvm/examples/generics.reid

10 lines
173 B
Plaintext

// Arithmetic, function calls and imports!
fn test<T>(value: T) -> T {
let b: T = value;
return b;
}
fn main() -> u32 {
return test<u64>(15) as u32 + test<u32>(5);
}