Browse Source

Fixed IsOrdinal from TValue.

Henrique Gottardi Werlang 3 years ago
parent
commit
2e1c24f789
1 changed files with 1 additions and 5 deletions
  1. 1 5
      packages/rtl/rtti.pas

+ 1 - 5
packages/rtl/rtti.pas

@@ -847,12 +847,8 @@ begin
 end;
 
 function TValue.IsOrdinal: boolean;
-var
-  k: TTypeKind;
 begin
-  k:=Kind;
-  Result := (k in [tkInteger, tkBool]) or
-            ((k in [tkClass, tkClassRef, tkUnknown]) and not JS.isObject(FData));
+  Result := IsEmpty or (Kind in [tkBool, tkInteger, tkChar, tkEnumeration]);
 end;
 
 function TValue.AsOrdinal: NativeInt;