mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 08:09:29 +02:00
Mantis #22792 was fixed by partial specializations addition in revision 27861
+ added test git-svn-id: trunk@27900 -
This commit is contained in:
parent
ed46a07f62
commit
60ef0a61bc
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
34
tests/webtbs/tw22792.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user