Mantis #24690 was fixed by partial specializations addition in revision 27861

+ added test

git-svn-id: trunk@27897 -
This commit is contained in:
svenbarth 2014-06-08 11:34:32 +00:00
parent 47407d2d7a
commit 8b290f4cb2
2 changed files with 56 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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
View 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.