It makes no sense to assign block to an object conforming to protocols. Such objects must implement methods of those protocols which blocks cannot. I explicitly ruled this out. Did you see this in an actual user code? Curious to see how it is being used.
- Fariborz On May 30, 2014, at 10:32 AM, Argyrios Kyrtzidis <[email protected]> wrote: > This is giving an error in the following case, is this correct ? > > #import <Foundation/Foundation.h> > > typedef void(^blk)(void); > > void foo(blk b) { > id<NSObject> x = b; // error: initializing 'id<NSObject>' with an > expression of incompatible type 'blk' (aka 'void (^)(void)') > } > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
