blob: 28f8d775d0c8e44bb590b9f5095b045cad78758a [file] [log] [blame]
Chris Lattnerae0ee032008-12-04 23:20:07 +00001// RUN: clang %s -fsyntax-only -verify -fblocks
Steve Naroff6c4088e2008-09-29 16:51:41 +00002
3@interface Whatever
4- copy;
5@end
6
7typedef long (^MyBlock)(id obj1, id obj2);
8
9void foo(MyBlock b) {
10 id bar = [b copy];
11}
12
Steve Naroffb4406862008-09-29 18:10:17 +000013void foo2(id b) {
14}
15
16void foo3(void (^block)(void)) {
17 foo2(block);
18 id x;
19 foo(x);
20}