check that Module is an atom before calling Module:goal_expansion/2
This commit is contained in:
@@ -60,7 +60,8 @@ term_expansion_list([Term|Terms], ExpandedTermsHead, ExpandedTermsTail) :-
|
||||
|
||||
|
||||
goal_expansion(Goal, Module, ExpandedGoal) :-
|
||||
( catch('$call'(Module:goal_expansion(Goal, ExpandedGoal0)),
|
||||
( atom(Module),
|
||||
catch('$call'(Module:goal_expansion(Goal, ExpandedGoal0)),
|
||||
E,
|
||||
'$call'(loader:'$print_message_and_fail'(E))) ->
|
||||
( var(ExpandedGoal0) ->
|
||||
|
||||
Reference in New Issue
Block a user