clause should always deref before testing type

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1285 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2005-04-28 14:50:45 +00:00
parent 92c6e7d93a
commit 767eb026fb

View File

@ -11,8 +11,14 @@
* File: index.c * * File: index.c *
* comments: Indexing a Prolog predicate * * comments: Indexing a Prolog predicate *
* * * *
* Last rev: $Date: 2005-04-27 20:09:25 $,$Author: vsc $ * * Last rev: $Date: 2005-04-28 14:50:45 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $ * $Log: not supported by cvs2svn $
* Revision 1.124 2005/04/27 20:09:25 vsc
* indexing code could get confused with suspension points
* some further improvements on oveflow handling
* fix paths in Java makefile
* changs to support gibbs sampling in CLP(BN)
*
* Revision 1.123 2005/04/21 13:53:05 vsc * Revision 1.123 2005/04/21 13:53:05 vsc
* fix bug with (var(X) -> being interpreted as var(X) by indexing code * fix bug with (var(X) -> being interpreted as var(X) by indexing code
* *
@ -7642,7 +7648,7 @@ Yap_FollowIndexingCode(PredEntry *ap, yamop *ipc, Term Terms[3], yamop *ap_pc, y
if (ap->ModuleOfPred != IDB_MODULE) { if (ap->ModuleOfPred != IDB_MODULE) {
if (ap->ArityOfPE) { if (ap->ArityOfPE) {
CELL *tar = RepAppl(Terms[0]); CELL *tar = RepAppl(Deref(Terms[0]));
UInt i; UInt i;
for (i = 1; i <= ap->ArityOfPE; i++) { for (i = 1; i <= ap->ArityOfPE; i++) {