mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 21:28:03 +02:00

+ added tests (original test was only mode fpc, test for mode delphi is added as well) git-svn-id: trunk@35010 -
24 lines
321 B
ObjectPascal
24 lines
321 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tw30939a;
|
|
|
|
{$MODESWITCH result}
|
|
|
|
Type
|
|
generic TGData<T> = record
|
|
b: T
|
|
end;
|
|
|
|
generic TGWrapper<T> = record
|
|
a: specialize TGData<T>
|
|
end;
|
|
|
|
generic Function DoSomething<T>: specialize TGWrapper<T>;
|
|
Begin
|
|
result.a.b := default(T)
|
|
End;
|
|
|
|
Begin
|
|
specialize DoSomething<LongInt>;
|
|
End.
|