Method lookup: why does this not fail for zygote adjoint overload

when a module foo does have Zygote to take AD, how come @eval foo f'not fail:

using Zygote
module foo
    f(x) = sin(x)
end

using .foo

@eval foo f'(1.2) - cos(1.2)

src code is at Zygote.jl/src/compiler/interface.jl at e0af1a814b9c1b652861eda5db27ddec13a28d16 · FluxML/Zygote.jl · GitHub

I’m missing something. Do you expect it to fail? How?