Merge pull request #932 from pmoura/fix_abolish_bug_with_no_existing_predicates

Fix abolish/1 to succeed on non-existing predicates as per standard
This commit is contained in:
Mark Thom
2021-05-08 12:39:28 -06:00
committed by GitHub

View File

@@ -1035,6 +1035,8 @@ module_abolish(Pred, Module) :-
; functor(Head, Name, Arity) -> ; functor(Head, Name, Arity) ->
( '$head_is_dynamic'(Module, Head) -> ( '$head_is_dynamic'(Module, Head) ->
'$abolish_clause'(Module, Name, Arity) '$abolish_clause'(Module, Name, Arity)
; '$no_such_predicate'(Module, Head) ->
true
; throw(error(permission_error(modify, static_procedure, Pred), abolish/1)) ; throw(error(permission_error(modify, static_procedure, Pred), abolish/1))
) )
) )