Since the beginning of using Odin, the most common mistake I make is like this:
make_test_data :: proc(iterations: int, seed: int) -> []int {
seed := seed
data : []int
for iteration in 0..iterations {
data := make([]int, random_int())
}
return data
This returns nothing, because I re-initialized data with := rather than setting its value with just =.
If you are unfortunate enough to miss this (a lot easier to miss in non-trivial examples) it can be a very non-obvious source of bugs.
A compiler warning or error would trivially prevent this. It’s rare a reasonable person would want to re-use variable names in nested scopes like this. Downside is it breaks code for people that have used the same names in nested scopes, unless of course just a warning.