ENHANCED: Correct type error for char_type/2.

This addresses #905.
This commit is contained in:
Markus Triska
2021-11-29 19:32:55 +01:00
parent e47aef5615
commit 79a50de697

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)
). ).