Skip to content

Commit c5c78df

Browse files
kernel: fix check in OutNeighbours
1 parent c0591c9 commit c5c78df

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/digraphs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Obj FuncOutNeighbours(Obj self, Obj D) {
8686
if (!RNamOutNeighbours) {
8787
RNamOutNeighbours = RNamName("OutNeighbours");
8888
}
89-
if (!CALL_1ARGS(IsDigraph, D)) {
89+
if (CALL_1ARGS(IsDigraph, D) != True) {
9090
ErrorQuit("expected a digraph, not a %s", (Int) TNAM_OBJ(D), 0L);
9191
} else if (IsbPRec(D, RNamOutNeighbours)) {
9292
return ElmPRec(D, RNamOutNeighbours);

tst/standard/digraph.tst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,10 @@ false
18731873
gap> "brinkmann" in ListNamedDigraphs("man", 1000);
18741874
true
18751875

1876+
# OutNeighbours
1877+
gap> OutNeighbours(OutNeighbours);
1878+
Error, expected a digraph, not a function
1879+
18761880
# DIGRAPHS_UnbindVariables
18771881
gap> Unbind(G);
18781882
gap> Unbind(adj);

0 commit comments

Comments
 (0)