* fix invalid typecast

git-svn-id: trunk@8432 -
This commit is contained in:
peter 2007-09-11 22:13:31 +00:00
parent f88c5e1324
commit 68245771cc

View File

@ -730,22 +730,22 @@ implementation
(ttypesym(srsym).typedef.typ=objectdef) then
begin
aclass:=tobjectdef(ttypesym(srsym).typedef);
aprocsym:=tprocsym(aclass.symtable.Find(sp));
{ we solve this below }
if assigned(aprocsym) then
srsym:=tsym(aclass.symtable.Find(sp));
if assigned(srsym) then
begin
if aprocsym.typ<>procsym then
begin
{ we use a different error message for tp7 so it looks more compatible }
if (m_fpc in current_settings.modeswitches) then
Message1(parser_e_overloaded_no_procedure,aprocsym.realname)
else
Message(parser_e_methode_id_expected);
{ rename the name to an unique name to avoid an
error when inserting the symbol in the symtable }
orgsp:=orgsp+'$'+tostr(current_filepos.line);
aprocsym:=nil;
end;
if srsym.typ=procsym then
aprocsym:=tprocsym(srsym)
else
begin
{ we use a different error message for tp7 so it looks more compatible }
if (m_fpc in current_settings.modeswitches) then
Message1(parser_e_overloaded_no_procedure,srsym.realname)
else
Message(parser_e_methode_id_expected);
{ rename the name to an unique name to avoid an
error when inserting the symbol in the symtable }
orgsp:=orgsp+'$'+tostr(current_filepos.line);
end;
end
else
begin