From 1b3f290037f8864d58059d5dee85f4562a71fb0e Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Wed, 24 Nov 2021 19:11:14 -0700 Subject: [PATCH] throw instantiation error if Arity is a variable in abolish/1 --- src/lib/builtins.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/builtins.pl b/src/lib/builtins.pl index 2f3066f3..41215a80 100644 --- a/src/lib/builtins.pl +++ b/src/lib/builtins.pl @@ -1003,6 +1003,7 @@ module_abolish(Pred, Module) :- ; throw(error(permission_error(modify, static_procedure, Pred), abolish/1)) ) ) + ; var(Arity) -> throw(error(instantiation_error, abolish/1)) ; throw(error(type_error(integer, Arity), abolish/1)) ) ; throw(error(type_error(predicate_indicator, Module:Pred), abolish/1)) -- 2.54.0