mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 07:43:04 +01:00 
			
		
		
		
	bug0198 solved
This commit is contained in:
		
							parent
							
								
									8a7250cdc6
								
							
						
					
					
						commit
						cbad5f2934
					
				@ -1,9 +1,31 @@
 | 
			
		||||
{$mode fpcobj}
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
   to1 = class
 | 
			
		||||
   to1 = class (tobject)
 | 
			
		||||
       x : longint;
 | 
			
		||||
       constructor init;
 | 
			
		||||
       function GetCaps1 : Longint;virtual;abstract;
 | 
			
		||||
       function GetCaps2 : Longint;virtual;stdcall;
 | 
			
		||||
       function GetCaps : Longint;virtual;stdcall;abstract;
 | 
			
		||||
       destructor done;virtual; 
 | 
			
		||||
   end;
 | 
			
		||||
 
 | 
			
		||||
   constructor to1.init;
 | 
			
		||||
    begin
 | 
			
		||||
      x:=5;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
   function to1.GetCaps2 : longint;
 | 
			
		||||
    begin
 | 
			
		||||
      GetCaps2:=x;
 | 
			
		||||
    end;
 | 
			
		||||
 
 | 
			
		||||
   destructor to1.done;
 | 
			
		||||
    begin
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
var o1 : to1;
 | 
			
		||||
begin
 | 
			
		||||
  o1:=to1.create;
 | 
			
		||||
  if o1.getCaps2<>5 then halt(1);
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
@ -240,6 +240,8 @@ Fixed bugs:
 | 
			
		||||
  bug0196.pp   "function a;" is accepted (should require result type) OK 0.99.1 (PM)
 | 
			
		||||
  bug0197.pp   should produce an error: problem with c1:=c2<c3 where c? is OK 0.99.11 (PM)
 | 
			
		||||
               a comp type
 | 
			
		||||
  bug0198.pp   calling specifications aren't allowed in class declarations,
 | 
			
		||||
               this should be allowed                                OK 0.99.11  (PM)
 | 
			
		||||
  bug0199.pp   bug in mul code                                       OK 0.99.11  (FK)
 | 
			
		||||
  bug0200.pp   array of char overloading problem with strings        OK 0.99.11 (PFV)
 | 
			
		||||
  bug0201.pp   problem with record var-parameters and assembler      OK 0.99.11 (PFV)
 | 
			
		||||
@ -302,8 +304,6 @@ bug0226.pp   Asm, offset of var is not allowed as constant
 | 
			
		||||
bug0228.pp   Asm, wrong warning for size
 | 
			
		||||
 | 
			
		||||
bug0185.pp   missing range checking for Val and subrange types
 | 
			
		||||
bug0198.pp   calling specifications aren't allowed in class declarations,
 | 
			
		||||
             this should be allowed
 | 
			
		||||
bug0212.pp   problem with properties
 | 
			
		||||
bug0217.pp   in tp mode can't use the procvar in writeln
 | 
			
		||||
bug0221.pp   syntax parsing incompatibilities with tp7
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user