* don't complain if the external name of a complete definition and that

of a forward definition don't match, since forward definitions can't
    have an external name (nor can they be used in a situation where it's
    necessary)

git-svn-id: branches/jvmbackend@18445 -
This commit is contained in:
Jonas Maebe 2011-08-20 08:00:13 +00:00
parent fc7725efba
commit f1c7e018c4

View File

@ -2164,7 +2164,11 @@ implementation
(tobjectdef(ttypesym(srsym).typedef).objecttype=pd.objecttype) and
not(oo_is_formal in tobjectdef(ttypesym(srsym).typedef).objectoptions) then
begin
{ the external name for the formal and the real definition must match }
if not(oo_is_forward in tobjectdef(ttypesym(srsym).typedef).objectoptions) then
begin
{ the external name for the formal and the real
definition must match (forward declarations don't have
an external name set yet) }
if assigned(tobjectdef(ttypesym(srsym).typedef).import_lib) or
assigned(pd.import_lib) then
begin
@ -2192,6 +2196,7 @@ implementation
Message2(sym_e_external_class_name_mismatch1,formalnameptr^,pd.typename);
MessagePos1(srsym.fileinfo,sym_e_external_class_name_mismatch2,foundnameptr^);
end;
end;
result:=tobjectdef(ttypesym(srsym).typedef);
if assigned(current_procinfo) and
(srsym.owner.symtabletype=staticsymtable) then