From 33c618799031da5798cd5a1fb3837c7804b7d1b7 Mon Sep 17 00:00:00 2001 From: Oren Ben-Kiki Date: Tue, 2 Apr 2024 12:44:49 +0300 Subject: [PATCH] Ensure eval is called in the proper module context. --- docs/v0.1.0/.documenter-siteinfo.json | 2 +- src/computations.jl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/v0.1.0/.documenter-siteinfo.json b/docs/v0.1.0/.documenter-siteinfo.json index a62b25a..f9d988a 100644 --- a/docs/v0.1.0/.documenter-siteinfo.json +++ b/docs/v0.1.0/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-02T11:52:43","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-02T12:44:18","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/src/computations.jl b/src/computations.jl index 660fd0a..11363ac 100644 --- a/src/computations.jl +++ b/src/computations.jl @@ -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) @@ -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)