generate type error on second arg to term variables/2 (UN 198)

This commit is contained in:
Vítor Santos Costa 2012-03-18 00:07:06 +00:00
parent 06242879c0
commit 5c6c034ec9

View File

@ -1955,6 +1955,11 @@ p_term_variables( USES_REGS1 ) /* variables in term t */
{
Term out;
if (!Yap_IsListOrPartialListTerm(ARG2)) {
Yap_Error(TYPE_ERROR_LIST,ARG2,"term_variables/2");
return FALSE;
}
do {
Term t = Deref(ARG1);
if (IsVarTerm(t)) {