title: With typedef enum, return type enum EnumName produces compiler error when returning an enum member
body: <p>I have an enum</p>
  
  <pre><code>typedef enum {
      kOne,
      kTwo,
      kThree,
      kFour
  } Enums;
  </code></pre>
  
  <p>And, in my .h file I have </p>
  
  <pre><code>- (enum Enums)getEnum;
  </code></pre>
  
  <p>In my .m file I have</p>
  
  <pre><code>- (enum Enums) getEnum {
      return kOne;
  }
  </code></pre>
  
  <p>However, I'm getting the error</p>
  
  <blockquote>
    <p>Returning 'int' from a function with incompatible result type 'enum Enums'</p>
  </blockquote>
  
  <p>I'm returning one of the enums so I'm not sure what the error is about.</p>