Commit 526fb0d638ef63220713f97cdaf586e3e2b8b189

Thomas de Grivel 2023-10-19T14:00:14

fix env_operator_call_ident

diff --git a/libc3/env.c b/libc3/env.c
index 28609ac..7c6a997 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -756,11 +756,11 @@ s_ident * env_operator_call_ident (s_env *env, const s_ident *op,
   s_facts_with_cursor cursor;
   s_tag tag_arity;
   s_tag tag_arity_u8;
-  s_tag tag_ident;
   s_tag tag_is_a;
   s_tag tag_module;
   s_tag tag_module_name;
   s_tag tag_operator;
+  s_tag tag_operator_var;
   s_tag tag_sym;
   s_tag tag_symbol;
   s_ident tmp;
@@ -768,21 +768,22 @@ s_ident * env_operator_call_ident (s_env *env, const s_ident *op,
   ident_resolve_module(&tmp, env);
   tag_init_1(  &tag_arity, ":arity");
   tag_init_u8( &tag_arity_u8, arity);
-  tag_init_var(&tag_ident);
   tag_init_1(  &tag_is_a, ":is_a");
   tag_init_1(  &tag_module, ":module");
   tag_init_sym(&tag_module_name, tmp.module);
+  tag_init_1(  &tag_operator, ":operator");
+  tag_init_var(&tag_operator_var);
   tag_init_sym(&tag_sym, tmp.sym);
   tag_init_1(  &tag_symbol, ":symbol");
   facts_with(&env->facts, &cursor, (t_facts_spec) {
       &tag_module_name, &tag_is_a, &tag_module,
-      &tag_operator, &tag_ident, NULL,   /* module exports operator */
-      &tag_ident, &tag_symbol, &tag_sym,
+      &tag_operator, &tag_operator_var, NULL,   /* module exports operator */
+      &tag_operator_var, &tag_symbol, &tag_sym,
       &tag_arity, &tag_arity_u8,
       NULL, NULL });
   if (facts_with_cursor_next(&cursor)) {
-    if (tag_ident.type == TAG_IDENT) {
-      *dest = tag_ident.data.ident;
+    if (tag_operator_var.type == TAG_IDENT) {
+      *dest = tag_operator_var.data.ident;
       facts_with_cursor_clean(&cursor);
       return dest;
     }