Skip to content

Commit

Permalink
Modules - overwite import with local definition, re issue #625
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Nov 12, 2024
1 parent ff50e2a commit 465bb45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,10 +1484,10 @@ static bool check_not_multifile(module *m, predicate *pr, rule *dbe_orig)
}
}

if (pr->alias) {
//fprintf(stderr, "Warning: overwriting %s:'%s'/%u\n", pr->m->name, C_STR(m, &pr->key), pr->key.arity);
//pr->meta_args = NULL;
//pr->alias = NULL;
if (pr->alias && (m == m->pl->user_m)) {
fprintf(stderr, "Warning: overwriting %s:'%s'/%u\n", pr->m->name, C_STR(m, &pr->key), pr->key.arity);
pr->meta_args = NULL;
pr->alias = NULL;
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/test072.pl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
var_list(N, L) :-
length(L, N).

transpose(M, T) :-
my_transpose(M, T) :-
[H|_] = M,
length(H, NCols),
from_to(1, NCols, L),
Expand Down Expand Up @@ -188,7 +188,7 @@
ad_partition(Size, Partition),
rep_perm(Size, Partition, Permutation),
list_permute(Permutation, M, P),
transpose(P, M),
my_transpose(P, M),
distinct(M),
eval_matrix(M, Frequencies),
total(Frequencies, Total).

0 comments on commit 465bb45

Please sign in to comment.