I have noticed a strange behaviour when using structs in a simple equation. When I use structs the results of the calculations are wrong, and I cannot really understand why. I have made a minimal example that demonstrates the issue:
struct Env
L
end
env = Env(2)
t = 4
println("t-env.L+1: ", t-env.L+1)
println("t-(env.L+1): ", t-(env.L+1))
The code above results in the following output:
t-env.L+1: 3
t-(env.L+1): 1
Any clues why this is the case? is it a bug or a feature I just do not understand?