]> Repositorios git - scryer-prolog.git/commitdiff
Fix at_end_of_stream/1 predicate missing check for instantiation error
authorPaulo Moura <[email protected]>
Wed, 12 May 2021 20:17:11 +0000 (21:17 +0100)
committerPaulo Moura <[email protected]>
Wed, 12 May 2021 20:17:11 +0000 (21:17 +0100)
src/lib/builtins.pl

index d96e0a163abf6fb556703610284227334152700d..ac0a335ceacd866af63a4172c07c3c66a13d5719 100644 (file)
@@ -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
     ),