View Issue Details

IDProjectCategoryView StatusLast Update
0035687FPCRTLpublic2019-08-02 14:49
Reporterrd0x Assigned ToSven Barth  
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0035687: Add TValue.FromOrdinal to RTTI
DescriptionFPC misses TValue.FromOrdinal functionality
Steps To Reproducetry to run code from in 'Generics with extended RTTI' section and it will fail due to missing function
Additional Informationclass function TValue.FromOrdinal(ATypeInfo: PTypeInfo; AValue: Int64): TValue;
  if (FData.FTypeInfo=nil) or not (FData.FTypeInfo^.Kind in [tkInteger, tkChar, tkWChar, tkEnumeration, tkInt64]) then
    raise Exception.CreateFmt(SErrUnableToGetValueForType,[ATypeInfo^.Name]);

  TValue.Make(@AValue, ATypeInfo, Result);
Fixed in Revision42221
Attached Files


Sven Barth

2019-06-13 21:11

manager   ~0116716

I used the same kind of exception that Delphi uses.

Please test and close if okay.

Issue History

Date Modified Username Field Change
2019-06-07 21:40 rd0x New Issue
2019-06-13 21:10 Sven Barth Tag Attached: RTTI
2019-06-13 21:11 Sven Barth Assigned To => Sven Barth
2019-06-13 21:11 Sven Barth Status new => resolved
2019-06-13 21:11 Sven Barth Resolution open => fixed
2019-06-13 21:11 Sven Barth Fixed in Version => 3.3.1
2019-06-13 21:11 Sven Barth Fixed in Revision => 42221
2019-06-13 21:11 Sven Barth FPCTarget => -
2019-06-13 21:11 Sven Barth Note Added: 0116716
2019-08-02 14:49 rd0x Status resolved => closed