[Aimmath-commit] AIM/WEB-INF/maple Class.mpl,1.4,1.5
Brought to you by:
gustav_delius,
npstrick
From: Neil S. <nps...@us...> - 2004-09-17 13:59:38
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv348/WEB-INF/maple Modified Files: Class.mpl Log Message: Fixed bug to make method with no arguments override field in parent class. Index: Class.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Class.mpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Class.mpl 27 Aug 2003 22:34:37 -0000 1.4 --- Class.mpl 17 Sep 2004 13:59:28 -0000 1.5 *************** *** 80,92 **** if nops(indices) = 1 then ! if member(index,class['Fields']) then ! RETURN(eval(tbl)[index]); ! elif member(index,class['StaticFields']) then ! RETURN(class['StaticFieldValue'][index]); ! elif member(index,class['Methods']) then # A method with no arguments should override a field with the # same name in a parent class this := `Class/SetIndexFunction`(tbl,class['Name']); RETURN(cat(class['Name'],"!",index)(this)); elif member(index,class['IndirectFields']) then RETURN(eval(tbl)[class['FieldIndirectionTable'][index]][index]); --- 80,92 ---- if nops(indices) = 1 then ! if member(index,class['Methods']) then # A method with no arguments should override a field with the # same name in a parent class this := `Class/SetIndexFunction`(tbl,class['Name']); RETURN(cat(class['Name'],"!",index)(this)); + elif member(index,class['Fields']) then + RETURN(eval(tbl)[index]); + elif member(index,class['StaticFields']) then + RETURN(class['StaticFieldValue'][index]); elif member(index,class['IndirectFields']) then RETURN(eval(tbl)[class['FieldIndirectionTable'][index]][index]); |