Skip to content

Commit

Permalink
Show filename/line information in ApplicableMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson authored and markuspf committed Jan 9, 2017
1 parent 6d5a8a7 commit 478f4ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/function.g
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ BIND_GLOBAL( "EndlineFunc", ENDLINE_FUNC );
## provided by <Ref Func="FilenameFunc"/> and <Ref Func="StartlineFunc"/>
## <P/>
## <Log><![CDATA[
## gap> FilenameFunc( Intersection );
## gap> LocationFunc( Intersection );
## "... some path ... gap/lib/coll.gi:2467"
## # String is an attribute, so no information is stored
## gap> FilenameFunc( String );
## gap> LocationFunc( String );
## ""
## ]]></Log>
## </Description>
Expand Down
15 changes: 12 additions & 3 deletions lib/methwhy.g
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,13 @@ local oper,l,obj,skip,verbos,fams,flags,i,j,methods,flag,flag2,
for i in [1..Length(methods)/lent] do
nam:=methods[lent*(i-1)+l+4];
val:=methods[lent*(i-1)+l+3];
oper:=methods[lent*(i-1)+l+2];
if verbos>1 then
Print("#I Method ",i,": ``",nam,"'', value: ");
Print("#I Method ",i,": ``",nam,"''");
if LocationFunc(oper) <> "" then
Print(" at ",LocationFunc(oper));
fi;
Print(", value: ");
Print_Value_SFF(val);
Print("\n");
fi;
Expand Down Expand Up @@ -205,12 +210,16 @@ local oper,l,obj,skip,verbos,fams,flags,i,j,methods,flag,flag2,
od;
if flag then
if fams=fail or CallFuncList(methods[lent*(i-1)+1],fams) then
oper:=methods[lent*(i-1)+j+1];
if verbos=1 then
Print("#I Method ",i,": ``",nam,"'', value: ");
Print("#I Method ",i,": ``",nam,"''");
if LocationFunc(oper) <> "" then
Print(" at ",LocationFunc(oper));
fi;
Print(" , value: ");
Print_Value_SFF(val);
Print("\n");
fi;
oper:=methods[lent*(i-1)+j+1];
if verbos>5 then
Print("#I Function Body:\n");
Print(oper);
Expand Down

0 comments on commit 478f4ef

Please sign in to comment.