Use proper envs for Rust functions (#7623)

This commit is contained in:
Nick Cameron
2025-06-30 00:03:36 +12:00
committed by GitHub
parent af658c909d
commit ae3440df0a
3 changed files with 19 additions and 37 deletions

View File

@ -401,7 +401,7 @@ impl FunctionDefinition<'_> {
impl FunctionBody<'_> {
fn prep_mem(&self, exec_state: &mut ExecState) {
match self {
FunctionBody::Rust(_) => exec_state.mut_stack().push_new_env_for_rust_call(),
FunctionBody::Rust(_) => exec_state.mut_stack().push_new_root_env(true),
FunctionBody::Kcl(_, memory) => exec_state.mut_stack().push_new_env_for_call(*memory),
}
}