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

+ added test

git-svn-id: trunk@27900 -
This commit is contained in:
svenbarth 2014-06-08 15:43:46 +00:00
parent ed46a07f62
commit 60ef0a61bc
2 changed files with 35 additions and 0 deletions

1
.gitattributes vendored
View File

@ -13795,6 +13795,7 @@ tests/webtbs/tw2277.pp svneol=native#text/plain
tests/webtbs/tw22790a.pp svneol=native#text/pascal
tests/webtbs/tw22790b.pp svneol=native#text/pascal
tests/webtbs/tw22790c.pp svneol=native#text/pascal
tests/webtbs/tw22792.pp svneol=native#text/pascal
tests/webtbs/tw22796.pp svneol=native#text/plain
tests/webtbs/tw2280.pp svneol=native#text/plain
tests/webtbs/tw22860.pp svneol=native#text/plain

34
tests/webtbs/tw22792.pp Normal file
View File

@ -0,0 +1,34 @@
{ %NORUN }
program tw22792;
{$MODE DELPHI}
type
TStaticArray<T> = array [0..MaxInt div SizeOf(T) - 1] of T;
TWrapper<TValue> = class
strict private
type
PValue = ^TValue;
PList = ^TList;
TList = TStaticArray<PValue>;
{ Expand this manually to get rid of the error }
strict private
FList: PList;
public
procedure Z(const value: TValue);
end;
procedure TWrapper<TValue>.Z(const value: TValue);
begin
FList := GetMem(SizeOf(PValue));
FList^[0] := GetMem(SizeOf(TValue));
FList^[0]^ := value;
{ Error: Illegal qualifier; use a manual cast to get rid of the error }
FreeMem(FList^[0]);
FreeMem(FList, SizeOf(PValue));
end;
begin
end.