title: Why do I get "type has no typeinfo" error with an enum type
body: <p>I have declared the following enum type in which I want the first member to have the ordinal value of 1 (one) rather than the usual 0 (zero):</p>
  
  <pre><code>  type
      TMyEnum = (
                 meFirstValue = 1,
                 meSecondValue,
                 meThirdValue
                );
  </code></pre>
  
  <p>If I call <strong>TypeInfo()</strong>, e.g. as part of a call to <strong>GetEnumName()</strong>, I get a compiler error:</p>
  
  <pre><code>  GetEnumName(TypeInfo(TMyEnum), Ord(aValue));
  </code></pre>
  
  <p><strong>ERROR: "E2134: Type 'TMyEnum' has no typeinfo"</strong></p>
  
  <p>Why is this?</p>
  
  <p>I know that classes only have typeinfo if they are compiled with the <strong>$M</strong> compiler option enabled or (derive from some class which was, such as <strong>TPersistent</strong>) but I didn't think there were any special conditions for having typeinfo for enum types.</p>