Typedef cannot be referenced with a enum specifier

Viewed 281

In one of my projects, one of the external modules (SDK) fails to compile with the following error :

Semantic issue

Typedef `MyEnumType` cannot be referenced with a enum specifier

But it works fine with my other projects.

Here`s the header file where the error comes from :

typedef NS_ENUM(NSUInteger, MyEnumType) {
    value1,
    value2,
    value3,
};

@protocol MyProtocol <NSObject>

- (void)myFunction:(enum MyEnumType)type; // Compilation error shows here

@end

Since it works in other projects, I guess something is wrong in my project build settings ?

Any help would be appreciated, thanks

0 Answers
Related