Open pmoura opened 5 years ago
That is most likely what was intended. I think the remark also suggests that a ground test is not ok though, so I think I'll leave it as is for now. Nice catch of dubious code though!
The Logtalk linter flags the ground(json)
goal as a goal that's always true. This lint check can be fouled, however. It's also flagging elsewhere in the SWI-Prolog library the goal random(2) =:= 0
was always being false 🙃
In the following clause:
https://github.com/SWI-Prolog/packages-pengines/blob/463c37310f30a081370f0cf282c5e4a05c5b84d4/pengines_io.pl#L651-L658
Do you meant to write instead
ground(Term)
?