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:
@@ -1035,6 +1035,8 @@ module_abolish(Pred, Module) :-
|
||||
; functor(Head, Name, Arity) ->
|
||||
( '$head_is_dynamic'(Module, Head) ->
|
||||
'$abolish_clause'(Module, Name, Arity)
|
||||
; '$no_such_predicate'(Module, Head) ->
|
||||
true
|
||||
; throw(error(permission_error(modify, static_procedure, Pred), abolish/1))
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user