Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -fsyntax-only -verify -fblocks |
Steve Naroff | 6c4088e | 2008-09-29 16:51:41 +0000 | [diff] [blame] | 2 | |
3 | @interface Whatever | ||||
4 | - copy; | ||||
5 | @end | ||||
6 | |||||
7 | typedef long (^MyBlock)(id obj1, id obj2); | ||||
8 | |||||
9 | void foo(MyBlock b) { | ||||
10 | id bar = [b copy]; | ||||
11 | } | ||||
12 | |||||
Steve Naroff | b440686 | 2008-09-29 18:10:17 +0000 | [diff] [blame] | 13 | void foo2(id b) { |
14 | } | ||||
15 | |||||
16 | void foo3(void (^block)(void)) { | ||||
17 | foo2(block); | ||||
18 | id x; | ||||
19 | foo(x); | ||||
20 | } |