mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 12:11:34 +01:00 
			
		
		
		
	* force static; being repeated in the procedure body, this avoids trouble as in #12242
+ add static when using fullprocname git-svn-id: trunk@11835 -
This commit is contained in:
		
							parent
							
								
									20a8aced3c
								
							
						
					
					
						commit
						8c9baed5cb
					
				
							
								
								
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							| @ -8564,6 +8564,7 @@ tests/webtbs/tw1222.pp svneol=native#text/plain | |||||||
| tests/webtbs/tw12224.pp svneol=native#text/plain | tests/webtbs/tw12224.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw1223.pp svneol=native#text/plain | tests/webtbs/tw1223.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw12233.pp svneol=native#text/plain | tests/webtbs/tw12233.pp svneol=native#text/plain | ||||||
|  | tests/webtbs/tw12242.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw1228.pp svneol=native#text/plain | tests/webtbs/tw1228.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw1229.pp svneol=native#text/plain | tests/webtbs/tw1229.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw1250.pp svneol=native#text/plain | tests/webtbs/tw1250.pp svneol=native#text/plain | ||||||
|  | |||||||
| @ -1920,7 +1920,7 @@ const | |||||||
|       mutexclpo     : [] |       mutexclpo     : [] | ||||||
|     ),( |     ),( | ||||||
|       idtok:_STATIC; |       idtok:_STATIC; | ||||||
|       pd_flags : [pd_interface,pd_object,pd_notobjintf]; |       pd_flags : [pd_interface,pd_implemen,pd_body,pd_object,pd_notobjintf]; | ||||||
|       handler  : @pd_static; |       handler  : @pd_static; | ||||||
|       pocall   : pocall_none; |       pocall   : pocall_none; | ||||||
|       pooption : [po_staticmethod]; |       pooption : [po_staticmethod]; | ||||||
|  | |||||||
| @ -3149,9 +3149,12 @@ implementation | |||||||
|               not(is_void(returndef)) then |               not(is_void(returndef)) then | ||||||
|               s:=s+':'+returndef.GetTypeName; |               s:=s+':'+returndef.GetTypeName; | ||||||
|         end; |         end; | ||||||
|  |         s:=s+';'; | ||||||
|         { forced calling convention? } |         { forced calling convention? } | ||||||
|         if (po_hascallingconvention in procoptions) then |         if (po_hascallingconvention in procoptions) then | ||||||
|           s:=s+';'+ProcCallOptionStr[proccalloption]; |           s:=s+' '+ProcCallOptionStr[proccalloption]+';'; | ||||||
|  |         if po_staticmethod in procoptions then | ||||||
|  |           s:=s+' Static;'; | ||||||
|         fullprocname:=s; |         fullprocname:=s; | ||||||
|       end; |       end; | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										29
									
								
								tests/webtbs/tw12242.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								tests/webtbs/tw12242.pp
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | { | ||||||
|  |  staticbug.pas | ||||||
|  | 
 | ||||||
|  |  With FPC 2.2.2: | ||||||
|  | 
 | ||||||
|  |  staticbug.lpr(24,31) Error: function header doesn't match the previous declaration "class TMyController.doClose(Pointer, Pointer, Pointer);CDecl" | ||||||
|  | } | ||||||
|  | program staticbug; | ||||||
|  | 
 | ||||||
|  | {$mode delphi}{$STATIC ON} | ||||||
|  | 
 | ||||||
|  | uses | ||||||
|  |   Classes, SysUtils; | ||||||
|  | 
 | ||||||
|  | type | ||||||
|  | 
 | ||||||
|  |   { TMyController } | ||||||
|  | 
 | ||||||
|  |   TMyController = class | ||||||
|  |   public | ||||||
|  |     class procedure doClose(_self: Pointer; _cmd: Pointer; sender: Pointer); cdecl; static; | ||||||
|  |   end; | ||||||
|  | 
 | ||||||
|  | class procedure TMyController.doClose(_self: Pointer; _cmd: Pointer; sender: Pointer); cdecl; static; | ||||||
|  | begin | ||||||
|  | end; | ||||||
|  | 
 | ||||||
|  | begin | ||||||
|  | end. | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 florian
						florian