mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 10:19:31 +01:00 
			
		
		
		
	Mantis #24690 was fixed by partial specializations addition in revision 27861
+ added test git-svn-id: trunk@27897 -
This commit is contained in:
		
							parent
							
								
									47407d2d7a
								
							
						
					
					
						commit
						8b290f4cb2
					
				
							
								
								
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							@ -13875,6 +13875,7 @@ tests/webtbs/tw24536.pp svneol=native#text/plain
 | 
			
		||||
tests/webtbs/tw2454.pp svneol=native#text/plain
 | 
			
		||||
tests/webtbs/tw24540.pp svneol=native#text/plain
 | 
			
		||||
tests/webtbs/tw24651.pp svneol=native#text/pascal
 | 
			
		||||
tests/webtbs/tw24690.pp svneol=native#text/pascal
 | 
			
		||||
tests/webtbs/tw24705.pp svneol=native#text/pascal
 | 
			
		||||
tests/webtbs/tw2473.pp svneol=native#text/plain
 | 
			
		||||
tests/webtbs/tw2480.pp svneol=native#text/plain
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										55
									
								
								tests/webtbs/tw24690.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								tests/webtbs/tw24690.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,55 @@
 | 
			
		||||
unit tw24690;
 | 
			
		||||
 | 
			
		||||
{$mode objfpc}{$H+}
 | 
			
		||||
 | 
			
		||||
interface
 | 
			
		||||
 | 
			
		||||
type
 | 
			
		||||
  generic TMyGenericType<_T> = class
 | 
			
		||||
  public
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  { TMyClass }
 | 
			
		||||
 | 
			
		||||
  generic TMyClass<_T> = class
 | 
			
		||||
  public
 | 
			
		||||
    type
 | 
			
		||||
      TMyGenericTypeSpec = specialize TMyGenericType<_T>;
 | 
			
		||||
 | 
			
		||||
  public
 | 
			
		||||
    procedure Test;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
  { TMyClass2 }
 | 
			
		||||
 | 
			
		||||
  generic TMyClass2<_T> = class
 | 
			
		||||
  public
 | 
			
		||||
    type
 | 
			
		||||
      TMyClassSpec = specialize TMyClass<Integer>;
 | 
			
		||||
 | 
			
		||||
  public
 | 
			
		||||
    procedure Test2;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
implementation
 | 
			
		||||
 | 
			
		||||
{ TMyClass2 }
 | 
			
		||||
 | 
			
		||||
procedure TMyClass2.Test2;
 | 
			
		||||
var
 | 
			
		||||
  Enum: TMyClassSpec.TMyGenericTypeSpec; //Error: Error in type definition
 | 
			
		||||
begin
 | 
			
		||||
  Enum := TMyClassSpec.TMyGenericTypeSpec.Create;
 | 
			
		||||
  Enum.Destroy;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
{ TMyClass }
 | 
			
		||||
 | 
			
		||||
procedure TMyClass.Test;
 | 
			
		||||
begin
 | 
			
		||||
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
end.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user