From 3a2449508ba377e9e3406dd78be1eb0db77cb024 Mon Sep 17 00:00:00 2001 From: kuviman Date: Sat, 7 Dec 2024 16:07:42 +0400 Subject: [PATCH] substitute bindings before getting current context --- src/interpreter.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interpreter.rs b/src/interpreter.rs index 9345903..696f5b9 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -1133,7 +1133,10 @@ impl Kast { Value::Unit } Expr::CurrentContext { data } => { - let ty = data.ty.clone(); + let ty = data + .ty + .clone() + .substitute_bindings(self, &mut RecurseCache::new()); self.interpreter .contexts .lock()