mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 21:28:21 +02:00
19 lines
316 B
ObjectPascal
19 lines
316 B
ObjectPascal
unit uw38827;
|
|
{$mode Delphi}
|
|
interface
|
|
type
|
|
TRec = record
|
|
C: TArray<single>;
|
|
function GetArr<T>: TArray<T>; inline;
|
|
end;
|
|
implementation
|
|
function TRec.GetArr<T>: TArray<T>;
|
|
begin
|
|
result := nil;
|
|
case GetTypeKind(T) of
|
|
tkFloat:
|
|
if SizeOf(T) = SizeOf(Single) then result := C;
|
|
end;
|
|
end;
|
|
end.
|