From: Paulo Moura Date: Wed, 12 May 2021 20:17:11 +0000 (+0100) Subject: Fix at_end_of_stream/1 predicate missing check for instantiation error X-Git-Tag: v0.9.0~67^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=6540fea4dafe4367ad27871fbe73834056770489;p=scryer-prolog.git Fix at_end_of_stream/1 predicate missing check for instantiation error --- diff --git a/src/lib/builtins.pl b/src/lib/builtins.pl index d96e0a16..ac0a335c 100644 --- a/src/lib/builtins.pl +++ b/src/lib/builtins.pl @@ -1607,7 +1607,9 @@ stream_property(S, P) :- at_end_of_stream(S_or_a) :- - ( atom(S_or_a) -> + ( var(S_or_a) -> + throw(error(instantiation_error, at_end_of_stream/1)) + ; atom(S_or_a) -> stream_property(S, alias(S_or_a)) ; S = S_or_a ),