Skip to content

Commit

Permalink
Ensure eval is called in the proper module context.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed Apr 2, 2024
1 parent 460032a commit 33c6187
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/v0.1.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-02T11:52:43","documenter_version":"1.3.0"}}
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-02T12:44:18","documenter_version":"1.3.0"}}
7 changes: 5 additions & 2 deletions src/computations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ macro computation(contract, definition)
set_metadata_of_function(
function_module,
function_name,
FunctionMetadata([eval(contract)], collect_defaults(inner_definition)),
FunctionMetadata([function_module.eval(contract)], collect_defaults(inner_definition)),
)

inner_definition[:name] = Symbol(function_name, :_inner)
Expand Down Expand Up @@ -185,7 +185,10 @@ macro computation(first_contract, second_contract, definition)
set_metadata_of_function(
function_module,
function_name,
FunctionMetadata([eval(first_contract), eval(second_contract)], collect_defaults(inner_definition)),
FunctionMetadata(
[function_module.eval(first_contract), function_module.eval(second_contract)],
collect_defaults(inner_definition),
),
)

inner_definition[:name] = Symbol(function_name, :_inner)
Expand Down

0 comments on commit 33c6187

Please sign in to comment.