diff options
Diffstat (limited to 'test/SemaObjC/block-ivar.m')
-rw-r--r-- | test/SemaObjC/block-ivar.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaObjC/block-ivar.m b/test/SemaObjC/block-ivar.m new file mode 100644 index 000000000000..231c9a23f8ad --- /dev/null +++ b/test/SemaObjC/block-ivar.m @@ -0,0 +1,19 @@ +// RUN: clang-cc -fsyntax-only -verify %s -fblocks + +@interface NSObject { + struct objc_object *isa; +} +@end +@interface Foo : NSObject { + int _prop; +} +@end + +@implementation Foo +- (int)doSomething { + int (^blk)(void) = ^{ return _prop; }; + return blk(); +} + +@end + |