mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:49:26 +02:00
* change the realname of procsyms belonging to overriding methods to
that of the overridden method for Java classes, since the realname is used as method identifier (and overriding is name-based and case-sensitive in Java) git-svn-id: branches/jvmbackend@18464 -
This commit is contained in:
parent
7310bbbaf6
commit
d6a56cfda6
@ -329,6 +329,12 @@ implementation
|
||||
{ no new entry, but copy the message name if any from
|
||||
the procdef in the parent class }
|
||||
check_msg_str(vmtpd,pd);
|
||||
{ in case of Java, copy the real name from the parent,
|
||||
since overriding "Destroy" with "destroy" is not
|
||||
going to work very well }
|
||||
if is_java_class_or_interface(_class) and
|
||||
(pd.procsym.realname<>vmtpd.procsym.realname) then
|
||||
pd.procsym.realname:=vmtpd.procsym.realname;
|
||||
result:=true;
|
||||
exit;
|
||||
end;
|
||||
@ -384,6 +390,12 @@ implementation
|
||||
if (vmtpd.extnumber<>i) then
|
||||
internalerror(200611084);
|
||||
pd.extnumber:=vmtpd.extnumber;
|
||||
{ in case of Java, copy the real name from the parent,
|
||||
since overriding "Destroy" with "destroy" is not
|
||||
going to work very well }
|
||||
if is_java_class_or_interface(_class) and
|
||||
(pd.procsym.realname<>vmtpd.procsym.realname) then
|
||||
pd.procsym.realname:=vmtpd.procsym.realname;
|
||||
vmtpd:=pd;
|
||||
end;
|
||||
result:=true;
|
||||
|
Loading…
Reference in New Issue
Block a user