didoudiaz / gprolog

GNU Prolog
Other
106 stars 13 forks source link

Fix the length/2 predicate to make length(L, L) fail instead of crashing #19

Closed pmoura closed 2 years ago

pmoura commented 2 years ago

With this fix (and the strict_iso flag turned off):

| ?- length(L, L).

no
| ?- length(1, 1).
uncaught exception: error(type_error(list,1),top_level/0)

All Logtalk bundled tests for this predicate pass (see latest git version).

didoudiaz commented 2 years ago

Integrated differently at the C level