mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 10:31:44 +01:00 
			
		
		
		
	
							parent
							
								
									60191d06d0
								
							
						
					
					
						commit
						cf19c0993a
					
				
							
								
								
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							| @ -8260,6 +8260,7 @@ tests/webtbs/tw8847.pp svneol=native#text/plain | |||||||
| tests/webtbs/tw8861.pp svneol=native#text/plain | tests/webtbs/tw8861.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw8870.pp svneol=native#text/plain | tests/webtbs/tw8870.pp svneol=native#text/plain | ||||||
| tests/webtbs/tw8883.pp svneol=native#text/plain | tests/webtbs/tw8883.pp svneol=native#text/plain | ||||||
|  | tests/webtbs/tw8919.pp svneol=native#text/plain | ||||||
| tests/webtbs/ub1873.pp svneol=native#text/plain | tests/webtbs/ub1873.pp svneol=native#text/plain | ||||||
| tests/webtbs/ub1883.pp svneol=native#text/plain | tests/webtbs/ub1883.pp svneol=native#text/plain | ||||||
| tests/webtbs/uw0555.pp svneol=native#text/plain | tests/webtbs/uw0555.pp svneol=native#text/plain | ||||||
|  | |||||||
| @ -727,7 +727,8 @@ implementation | |||||||
|           { no init/final needed } |           { no init/final needed } | ||||||
|           not (_typedef.needs_inittable) and |           not (_typedef.needs_inittable) and | ||||||
|           ((_typedef.typ <> pointerdef) or |           ((_typedef.typ <> pointerdef) or | ||||||
|            (not tpointerdef(_typedef).pointeddef.needs_inittable)); |            (is_object(tpointerdef(_typedef).pointeddef) or | ||||||
|  |             not tpointerdef(_typedef).pointeddef.needs_inittable)); | ||||||
|       end; |       end; | ||||||
| 
 | 
 | ||||||
|     constructor ttempcreatenode.create_withnode(_typedef: tdef; _size: aint; _temptype: ttemptype; allowreg:boolean; withnode: tnode); |     constructor ttempcreatenode.create_withnode(_typedef: tdef; _size: aint; _temptype: ttemptype; allowreg:boolean; withnode: tnode); | ||||||
|  | |||||||
							
								
								
									
										33
									
								
								tests/webtbs/tw8919.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								tests/webtbs/tw8919.pp
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | |||||||
|  | 
 | ||||||
|  | {$mode delphi} | ||||||
|  | 
 | ||||||
|  | type | ||||||
|  |   TOnProc = procedure of object; | ||||||
|  | 
 | ||||||
|  |   PMyObj = ^TMyObj; | ||||||
|  |   TMyObj = object | ||||||
|  |   private | ||||||
|  |     FOnProc: TOnProc; | ||||||
|  | 
 | ||||||
|  |     s: ansistring; | ||||||
|  |   public | ||||||
|  |     property OnProc: TOnProc read FOnProc write FOnProc; | ||||||
|  |     procedure Proc; | ||||||
|  |   end; | ||||||
|  | 
 | ||||||
|  | procedure TMyObj.Proc; | ||||||
|  | begin | ||||||
|  | end; | ||||||
|  | 
 | ||||||
|  | var | ||||||
|  |   obj: PMyObj; | ||||||
|  | 
 | ||||||
|  | begin | ||||||
|  |   New(obj); | ||||||
|  |   obj^.OnProc:=obj^.Proc; | ||||||
|  |   if TMethod(obj^.OnProc).Data <> obj then begin | ||||||
|  |     writeln('Test FAILED!'); | ||||||
|  |     Halt(1); | ||||||
|  |   end; | ||||||
|  |   writeln('Test OK!'); | ||||||
|  | end. | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 yury
						yury