On May 30, 2014, at 11:57 AM, jahanian <[email protected]> wrote:

> 
> On May 30, 2014, at 11:41 AM, Argyrios Kyrtzidis <[email protected]> wrote:
> 
>> 
>>> On May 30, 2014, at 11:34 AM, Argyrios Kyrtzidis <[email protected]> 
>>> wrote:
>>> 
>>> 
>>>> On May 30, 2014, at 11:13 AM, jahanian <[email protected]> wrote:
>>>> 
>>>> Is this intentional, or a specific case for retain/release methods?
>>> 
>>> This also returns TRUE:
>>> 
>>>     blk b = ^{};
>>>     BOOL res = [b respondsToSelector:@selector(isKindOfClass:)];
>>> 
>>> So blocks seem to respond to NSObject protocol selectors.
>>> 
>>>> In generally though it makes no sense
>>>> to allow qualified id conversion of blocks pointers.
>>> 
>>> It would make sense for id<NSObject> if we would guarantee that blocks 
>>> conform to NSObject protocol.
>> 
>> BTW, returns true as well:
>> 
>>      blk b = ^{};
>>      BOOL res = [b conformsToProtocol:@protocol(NSObject)];
> 
> We should run this by the Foundation people. For example, this also returns 1:
> BOOL res = [b respondsToSelector:@selector(dealloc)];
> But dealloc is not a method of NSObject protocol. But it is a method
> of NSObject class. It seems more and more that we should make an exception
> for NSObject as block implements its protocol and class.

Rules are relaxed  to allow certain conversions in r210491.

- Fariborz

> 
> - Fariborz
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to