Show
Ignore:
Timestamp:
07/02/08 10:55:15 (5 months ago)
Author:
pmoura
Message:

Fixed a bug when using aliases for category predicates that are called using the :/1 control construct without using static binding.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4335 r4337  
    31793179 
    31803180 
    3181 % '$lgt_call_ctg_pred'(+atom, +callable, +object_identifier, +object_identifier, +object_identifier) 
     3181% '$lgt_call_ctg_pred'(+atom, +atom, +callable, +object_identifier, +object_identifier, +object_identifier) 
    31823182% 
    31833183% calls a category predicate directly, without using the message sending mechanism 
    31843184 
    3185 '$lgt_call_ctg_pred'(Dcl, Pred, Sender, This, Self) :- 
    3186     (   call_with_args(Dcl, Pred, _, _, _, _, _, _, _) -> 
     3185'$lgt_call_ctg_pred'(Dcl, Rnm, Alias, Sender, This, Self) :- 
     3186    (   call_with_args(Dcl, Alias, _, _, _, _, _, _, _) -> 
     3187        call_with_args(Rnm, Ctg, Pred, Alias), 
    31873188        (   '$lgt_imports_category_'(This, Ctg, _), 
    31883189            '$lgt_current_category_'(Ctg, _, _, Def, _, _, _), 
     
    31903191            call(Call) 
    31913192        ) 
    3192     ;   throw(error(existence_error(predicate_declaration, Pred), ':'(Pred), This)) 
     3193    ;   throw(error(existence_error(predicate_declaration, Alias), ':'(Alias), This)) 
    31933194    ). 
    31943195 
     
    70117012        true 
    70127013    ;   Pred = Alias, 
    7013         '$lgt_pp_object_'(_, _, Dcl, _, _, IDcl, _, _, _, _, _), 
     7014        '$lgt_pp_object_'(_, _, Dcl, _, _, IDcl, _, _, _, Rnm, _), 
    70147015        (   \+ '$lgt_pp_instantiated_class_'(_, _, _, _, _, _, _, _, _, _), 
    70157016            \+ '$lgt_pp_specialized_class_'(_, _, _, _, _, _, _, _, _, _) -> 
    7016             TPred = '$lgt_call_ctg_pred'(Dcl, Pred, Sender, This, Self) 
    7017         ;   TPred = '$lgt_call_ctg_pred'(IDcl, Pred, Sender, This, Self) 
     7017            TPred = '$lgt_call_ctg_pred'(Dcl, Rnm, Pred, Sender, This, Self) 
     7018        ;   TPred = '$lgt_call_ctg_pred'(IDcl, Rnm, Pred, Sender, This, Self) 
    70187019        ) 
    70197020    ).