* patch by Aleksa Todorovic to fix generic interfaces, resolves #16100

git-svn-id: trunk@16477 -
This commit is contained in:
florian 2010-11-29 21:13:09 +00:00
parent 8a5c99599e
commit f570934b45
3 changed files with 24 additions and 1 deletions

1
.gitattributes vendored
View File

@ -10660,6 +10660,7 @@ tests/webtbs/tw16034.pp svneol=native#text/plain
tests/webtbs/tw16040.pp svneol=native#text/plain
tests/webtbs/tw16065.pp svneol=native#text/pascal
tests/webtbs/tw16083.pp svneol=native#text/plain
tests/webtbs/tw16100.pp svneol=native#text/pascal
tests/webtbs/tw16108.pp svneol=native#text/plain
tests/webtbs/tw16130.pp svneol=native#text/pascal
tests/webtbs/tw16161.pp svneol=native#text/pascal

View File

@ -5176,7 +5176,7 @@ implementation
begin
result:=false;
{ interfaces being implemented through delegation are not mergable (FK) }
if (IType<>etStandard) or (MergingIntf.IType<>etStandard) or not(assigned(ProcDefs)) then
if (IType<>etStandard) or (MergingIntf.IType<>etStandard) or not(assigned(ProcDefs)) or not(assigned(MergingIntf.ProcDefs)) then
exit;
weight:=0;
{ empty interface is mergeable }

22
tests/webtbs/tw16100.pp Normal file
View File

@ -0,0 +1,22 @@
{$mode objfpc}
{$interfaces corba}
type
MyInterface = interface
end;
generic MyGenInterface<_T> = interface
procedure MyProc(x:_T);
end;
MyGenInterface_Pointer = specialize MyGenInterface<Pointer>;
MyClass = class(MyInterface,MyGenInterface_Pointer)
procedure MyProc(x:Pointer);
end;
procedure MyClass.MyProc(x:Pointer);
begin
end;
begin
end.