You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
302 B
22 lines
302 B
4 months ago
|
// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
|
||
|
// expected-no-diagnostics
|
||
|
|
||
|
@interface Whatever
|
||
|
- copy;
|
||
|
@end
|
||
|
|
||
|
typedef long (^MyBlock)(id obj1, id obj2);
|
||
|
|
||
|
void foo(MyBlock b) {
|
||
|
id bar = [b copy];
|
||
|
}
|
||
|
|
||
|
void foo2(id b) {
|
||
|
}
|
||
|
|
||
|
void foo3(void (^block)(void)) {
|
||
|
foo2(block);
|
||
|
id x;
|
||
|
foo(x);
|
||
|
}
|