bad call to style_checker.

This commit is contained in:
Vítor Santos Costa 2014-05-07 09:35:57 +01:00
parent 06e29a4978
commit 98daf1ebdd
2 changed files with 4 additions and 2 deletions

View File

@ -913,7 +913,10 @@ p_style_checker( USES_REGS1 )
Term h = HeadOfTerm( t );
t = TailOfTerm( t );
if (IsAtomTerm(h)) {
if (IsVarTerm(h)) {
Yap_Error(INSTANTIATION_ERROR, t, "style_check/1");
return (FALSE);
} if (IsAtomTerm(h)) {
Atom at = AtomOfTerm( h );
if (at == AtomAtom) debugstatus.styleCheck |= LONGATOM_CHECK;
else if (at == AtomSingleton) debugstatus.styleCheck |= SINGLETON_CHECK;

View File

@ -137,7 +137,6 @@ style_check_(+charset) :-
style_check_(-charset) :-
'$style_checker'( [ -charset ] ).
style_check_('?'(Info) ) :-
'$style_checker '( [ L ] ),
lists:member( Style, [ singleton, discontiguous, multiple ] ),
( lists:member(Style, L ) -> Info = +Style ; Info = -Style ).
style_check_([]).