Skip to content

Instantly share code, notes, and snippets.

@zorgiepoo
Last active August 29, 2015 14:27
Show Gist options
  • Save zorgiepoo/3772802217e924a4802e to your computer and use it in GitHub Desktop.
Save zorgiepoo/3772802217e924a4802e to your computer and use it in GitHub Desktop.
Protocols break Obj-C generics in every sense (rdar://22204367)
@protocol M
@end
NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"];
NSNumber *bar = foo[0];
NSLog(@"%@", bar);
// No warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment