Merge pull request #937 from pmoura/fix_open_predicate_error_term_on_bound_stream_argument

Fix open/3-4 predicates error term when the stream argument is bound
This commit is contained in:
Mark Thom
2021-05-10 11:10:12 -06:00
committed by GitHub

View File

@@ -1459,7 +1459,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)