recognize []/N as callable (#1241, #989)

This commit is contained in:
Mark Thom
2022-01-20 23:46:03 -07:00
parent 8df346f377
commit 5ff579f793

View File

@@ -578,15 +578,13 @@ predicate_property(Callable, Property) :-
atom(Module),
nonvar(Callable0) ->
functor(Callable0, Name, Arity),
( atom(Name),
Name \== [] ->
( atom(Name) ->
extract_predicate_property(Property, PropertyType),
check_predicate_property(PropertyType, Module, Name, Arity, Property)
; type_error(callable, Callable0, predicate_property/2)
)
; functor(Callable, Name, Arity),
( atom(Name),
Name \== [] ->
( atom(Name) ->
extract_predicate_property(Property, PropertyType),
load_context(Module),
check_predicate_property(PropertyType, Module, Name, Arity, Property)