Re: Strange XCode Warning
Re: Strange XCode Warning
- Subject: Re: Strange XCode Warning
- From: Jens Alfke <email@hidden>
- Date: Tue, 15 Sep 2015 10:23:54 -0700
Class<ProtocolX> was allowable and would cause the compiler to generate a warning if “MyClass” does not conform to “ProtocolX”, e.g.
I’ve never seen that used before … which doesn’t prove it isn’t real, but I’m suspicious. Have you tested whether it actually triggers such a warning?
This fixes it:
if ([(Class)theDetailViewClass conformsToProtocol:@protocol(LTWDetailViewProtocol)] == NO)
Yeah, that would imply that the compiler sees “Class<ProtocolX>” as an instance type, not a class.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden