From 47a7b9ebb0083fd899de20eeeca7f42d886cd96f Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 17 Dec 2015 11:43:24 -0800 Subject: [PATCH] Prevent warnings on dictionaries w/o string keys Because the category makes the protocol apply to all `NSMutableDictionaries`, it can't assume keys are `NSString`. Because these types are covariant, the change is not breaking. --- src/objective-c/GRPCClient/GRPCCall.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index c9fda428552..7a77ae60b6a 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -241,11 +241,11 @@ DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.") @protocol GRPCRequestHeaders @property(nonatomic, readonly) NSUInteger count; -- (id)objectForKeyedSubscript:(NSString *)key; -- (void)setObject:(id)obj forKeyedSubscript:(NSString *)key; +- (id)objectForKeyedSubscript:(id)key; +- (void)setObject:(id)obj forKeyedSubscript:(id)key; - (void)removeAllObjects; -- (void)removeObjectForKey:(NSString *)key; +- (void)removeObjectForKey:(id)key; @end #pragma clang diagnostic push