This may be illustrative of the problem and two possible ways to circumvent the world age issue.

```
julia> expr = :(sin(x + y))
:(sin(x + y))
julia> function f1(expr, x, y)
f = eval(:((x, y) -> $expr))
return f(x, y)
end
f1 (generic function with 1 method)
julia> function f2(expr, x, y)
f = eval(:((x, y) -> $expr))
return @eval $f($x, $y)
end
f2 (generic function with 1 method)
julia> function f3(expr, x, y)
f = eval(:((x, y) -> $expr))
return Base.invokelatest(f, x, y)
end
f3 (generic function with 1 method)
julia> f1(expr, 1, 2)
ERROR: MethodError: no method matching (::##1#2)(::Int64, ::Int64)
The applicable method may be too new: running in world age 21836, while current world is 21837.
Closest candidates are:
#1(::Any, ::Any) at REPL[2]:2 (method too new to be called from this world context.)
Stacktrace:
[1] f1(::Expr, ::Int64, ::Int64) at ./REPL[2]:3
julia> f2(expr, 1, 2)
0.1411200080598672
julia> f3(expr, 1, 2)
0.1411200080598672
```