Merge pull request #1120 from triska/char_type_correction

ENHANCED: Correct type error for char_type/2.
This commit is contained in:
Mark Thom
2021-11-29 19:38:30 -05:00
committed by GitHub

View File

@@ -66,8 +66,7 @@ extend_var_list_([V|Vs], N, VarList, NewVarList, VarType) :-
char_type(Char, Type) :- char_type(Char, Type) :-
( var(Char) -> instantiation_error(char_type/2) must_be(character, Char),
; atom_length(Char, 1) ->
( ground(Type) -> ( ground(Type) ->
( ctype(Type) -> ( ctype(Type) ->
'$char_type'(Char, Type) '$char_type'(Char, Type)
@@ -75,8 +74,6 @@ char_type(Char, Type) :-
) )
; ctype(Type), ; ctype(Type),
'$char_type'(Char, Type) '$char_type'(Char, Type)
)
; type_error(in_character, Char, char_type/2)
). ).