From c8be65dc4c904808a970f30a8b5be45552ee5bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Mon, 2 Jan 2023 21:49:45 +0100 Subject: [PATCH] Interpreter - Remove checks for duplicate argument names --- src/interpreter/functions.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/interpreter/functions.rs b/src/interpreter/functions.rs index d13d15a..40d7daa 100644 --- a/src/interpreter/functions.rs +++ b/src/interpreter/functions.rs @@ -47,8 +47,7 @@ impl Callable for Function { assert_eq!(arguments.len(), self.arity()); let param_env = Environment::create_child(environment); for (arg, value) in izip!(self.params.iter(), arguments.into_iter()) { - // FIXME: duplicate parameter names should be detected in the parser - param_env.borrow_mut().define(arg, Some(value))?; + param_env.borrow_mut().define(arg, Some(value)).unwrap(); } let child = Environment::create_child(¶m_env);