]> Repositorios git - scryer-prolog.git/commitdiff
Fix open/3-4 predicates error term when the stream argument is bound
authorPaulo Moura <>
Sun, 9 May 2021 18:21:21 +0000 (19:21 +0100)
committerPaulo Moura <>
Sun, 9 May 2021 18:21:21 +0000 (19:21 +0100)
src/lib/builtins.pl

index 502827b6cf3dd7c85c66877147472ab40e27fb69..92fc76a97422b5704d6c3aa786acc3ff13b953c2 100644 (file)
@@ -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)