Skip to content

Commit e5f9206

Browse files
committed
FIXED: library(prolog_xref): track prolog_listen/2 properly.
Created called heads with arity 0, as in `p()` rather than `p`.
1 parent de83cfc commit e5f9206

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

library/prolog_xref.pl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Part of SWI-Prolog
22
33
Author: Jan Wielemaker
4-
E-mail: J.Wielemaker@vu.nl
5-
WWW: http://www.swi-prolog.org/projects/xpce/
6-
Copyright (c) 2006-2025, University of Amsterdam
4+
E-mail: jan@swi-prolog.org
5+
WWW: https://www.swi-prolog.org
6+
Copyright (c) 2006-2026, University of Amsterdam
77
VU University Amsterdam
88
CWI, Amsterdam
99
SWI-Prolog Solutions b.v.
@@ -1728,7 +1728,9 @@
17281728
callable(G),
17291729
extend(G, N, GX).
17301730
extend(G, N, GX) :-
1731-
( compound(G)
1731+
( N =:= 0
1732+
-> GX = G
1733+
; compound(G)
17321734
-> compound_name_arguments(G, Name, Args),
17331735
length(Rest, N),
17341736
append(Args, Rest, NArgs),

0 commit comments

Comments
 (0)