Hi everyone,

I am migrating from Matlab to Julia and I have noticed some weird (perhaps unwanted?) behavior of the ForwardDiff package.

```
using ForwardDiff
function eq()
function qfun(x)
q = x[1] + x[2]
return q
end
q = qfun([1.0, 2.0])
derq(x) = ForwardDiff.gradient(qfun,x)
dq = derq([1.0, 2.0])
return q
end
a = eq()
```

This does not return 3.0 but instead:

```
Dual{ForwardDiff.Tag{var"#qfun#17",Float64}}(3.0,1.0,1.0)
```

However, if I change the name of q inside qfun I get what I expected (3.0 as output):

```
using ForwardDiff
function eq()
function qfun(x)
q2 = x[1] + x[2]
return q2
end
q = qfun([1.0, 2.0])
derq(x) = ForwardDiff.gradient(qfun,x)
dq = derq([1.0, 2.0])
return q
end
a = eq()
```

```
3.0
```

Also, if I run this code outside a function, I get an output of 3.0 to q:

```
using ForwardDiff
function qfun(x)
q = x[1] + x[2]
return q
end
q = qfun([1.0, 2.0])
derq(x) = ForwardDiff.gradient(qfun,x)
dq = derq([1.0, 2.0])
q
```

```
3.0
```

What is going on? Is this a bug or am I missing something from some expected behavior of ForwardDiff? It sounds super weird to me that the label used inside a function can affect the final output.

Best,

Caio