I know that zig doesn'g support incompatible type, for example, I'd like the following to NOT compile:
const A = u64;
fn add(a: A, b: A) A {
return a + b;
}
comptime {
var a: u64 = 2;
var d = add(a, 4);
_ = d;
}
I'd like add to only accept variables declared with type A explicitly.
What do you recommend to implement this with the current zig features?