From 73c09e3365a9a3e50a94d479344d84b231e731b0 Mon Sep 17 00:00:00 2001 From: Paulo Moura <> Date: Sun, 9 May 2021 19:21:21 +0100 Subject: [PATCH] Fix open/3-4 predicates error term when the stream argument is bound --- src/lib/builtins.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/builtins.pl b/src/lib/builtins.pl index 502827b6..92fc76a9 100644 --- a/src/lib/builtins.pl +++ b/src/lib/builtins.pl @@ -1450,7 +1450,7 @@ open(SourceSink, Mode, Stream, StreamOptions) :- ; \+ atom(Mode) -> throw(error(type_error(atom, Mode), open/4)) % 8.11.5.3d) ; nonvar(Stream) -> - throw(error(type_error(variable, Stream), open/4)) % 8.11.5.3f) + throw(error(uninstantiation_error(Stream), open/4)) % 8.11.5.3f) ; parse_stream_options(StreamOptions, [Alias, EOFAction, Reposition, Type], open/4), '$open'(SourceSink, Mode, Stream, Alias, EOFAction, Reposition, Type) -- 2.54.0