You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using Mocking
julia>g(; x=1) ="I got x=$x"
g (generic function with 1 method)
julia>functionf()
x =1
result =@mockg(; x)
return result
end
ERROR: LoadError: MethodError: Cannot `convert` an object of type Symbol to an object of type Expr
Closest candidates are:convert(::Type{Expr}, ::Revise.RelocatableExpr) at /Users/eph/.julia/packages/Revise/9lZUE/src/relocatable_exprs.jl:22convert(::Type{T}, ::T) where T at essentials.jl:218Expr(::Any...) at boot.jl:263
Stacktrace:
[1] push!(a::Vector{Expr}, item::Symbol)
@ Base ./array.jl:968
[2] extract_kwargs(expr::Expr)
@ Mocking ~/.julia/packages/Mocking/U41JO/src/expr.jl:22
[3] var"@mock"(__source__::LineNumberNode, __module__::Module, expr::Any)
@ Mocking ~/.julia/packages/Mocking/U41JO/src/mock.jl:10
in expression starting at REPL[15]:3
(This works of course if we write @mock g(; x=x)).
The text was updated successfully, but these errors were encountered:
(This works of course if we write
@mock g(; x=x)
).The text was updated successfully, but these errors were encountered: