View Issue Details

IDProjectCategoryView StatusLast Update
0035693FPCRTLpublic2019-07-12 13:32
Reporterrd0xAssigned ToSven Barth 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.1Product Build 
Target VersionFixed in Version3.3.1 
Summary0035693: TValue.IsOrdinal can't convert enumerations
DescriptionTValue.IsOrdinal can't convert enumerations, prints exception with 'Invalid class typecast'
Additional Informationfunction TValue.IsOrdinal: boolean;
begin
  result := (Kind in [tkInteger, tkInt64, tkQWord, tkBool]) or
            ((Kind in [tkClass, tkClassRef, tkInterfaceRaw, tkUnknown]) and not Assigned(FData.FAsPointer));
end;

to

function TValue.IsOrdinal: boolean;
begin
  result := (Kind in [tkInteger, tkInt64, tkQWord, tkBool, tkEnumeration]) or
            ((Kind in [tkClass, tkClassRef, tkInterfaceRaw, tkUnknown]) and not Assigned(FData.FAsPointer));
end;
TagsRTTI
Fixed in Revision42219
FPCOldBugId
FPCTarget-
Attached Files

Activities

Sven Barth

2019-06-13 23:09

manager   ~0116715

Please test and close if okay.

Issue History

Date Modified Username Field Change
2019-06-08 16:21 rd0x New Issue
2019-06-13 23:09 Sven Barth Assigned To => Sven Barth
2019-06-13 23:09 Sven Barth Status new => resolved
2019-06-13 23:09 Sven Barth Resolution open => fixed
2019-06-13 23:09 Sven Barth Fixed in Version => 3.3.1
2019-06-13 23:09 Sven Barth Fixed in Revision => 42219
2019-06-13 23:09 Sven Barth FPCTarget => -
2019-06-13 23:09 Sven Barth Note Added: 0116715
2019-06-13 23:10 Sven Barth Tag Attached: RTTI
2019-07-12 13:32 rd0x Status resolved => closed