TypeInfo for Enum with Value lazarus / 64-FPC development ---------------------------------------------------------------------- Okoba · 2026-02-03 07:57 Hello, I get an error for TTest2 on the latest FPC as "Error: No type info available for this type". Is there a way to get TypeInfo for it? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1; uses  TypInfo; type  {$M+}  TTest1 = (t1A, t1B);  TTest2 = (t2A = 5, t2B = 10);begin  WriteLn(GetEnumNameCount(TypeInfo(TTest1)));  WriteLn(GetEnumNameCount(TypeInfo(TTest2)));  ReadLn;end. ---------------------------------------------------------------------- ALLIGATOR · 2026-02-03 08:34 D12.1CE: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i E2134 Type 'TTest2' has no type info ---------------------------------------------------------------------- Zvoni · 2026-02-03 08:45 I know: Wiki is not documentation, but it's the only place i found something https://wiki.freepascal.org/Enum_type QuoteProperties     An enumeration data type definition is ascending if the difference in ordinal value to every right-hand member is ≥ 1. Currently, non- ascending definitions merely emit a note. A set literal using two enumeration values having the same ordinal value, albeit represented by different symbols, will not be accepted.     An enumeration data type is contiguous if the ordinal value of every (named) member has an absolute difference of one to its neighbors. Using a set constructor on a non-contiguous enumeration data type may produce unexpected results.     An enumeration data type is normal if it is ascending and contiguous and the first member has an ordinal value of (strictly speaking) zero, or, in the broad sense (as implemented by the FPC), ≤ 0. The compiler intrinsic typeInfo is only available for those enumeration data types. Because this works. all other combinations fail Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  {$M+}  TTest1 = (t1A, t1B);  TTest2 = (t2A = -1, t2B = 0, t2C = 1);  //<--begin  WriteLn(GetEnumNameCount(TypeInfo(TTest1)));  WriteLn(GetEnumNameCount(TypeInfo(TTest2)));  ReadLn;end. ---------------------------------------------------------------------- PascalDragon · 2026-02-03 22:03 Quote from: Okoba on February 03, 2026, 08:57:06 amI get an error for TTest2 on the latest FPC as "Error: No type info available for this type". Is there a way to get TypeInfo for it? Enumeration types with holes in them do not have type information. This is Delphi-compatible.