```julia D(f, x) = ForwardDiff.derivative(f, x) D(1) do x f(y) = (x = x*y) D(f, 1) D(f, 1) end # => 2 ``` The correct answer is 1. This is essentially the same as https://github.com/YingboMa/ForwardDiff2.jl/issues/37.
Activity