mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 01:11:29 +01: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 |                         { no new entry, but copy the message name if any from | ||||||
|                           the procdef in the parent class } |                           the procdef in the parent class } | ||||||
|                         check_msg_str(vmtpd,pd); |                         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; |                         result:=true; | ||||||
|                         exit; |                         exit; | ||||||
|                       end; |                       end; | ||||||
| @ -384,6 +390,12 @@ implementation | |||||||
|                       if (vmtpd.extnumber<>i) then |                       if (vmtpd.extnumber<>i) then | ||||||
|                         internalerror(200611084); |                         internalerror(200611084); | ||||||
|                       pd.extnumber:=vmtpd.extnumber; |                       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; |                       vmtpd:=pd; | ||||||
|                     end; |                     end; | ||||||
|                   result:=true; |                   result:=true; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jonas Maebe
						Jonas Maebe