1 // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
9 typedef struct _foo *__attribute__((NSObject)) Foo_ref;
11 @interface TestObject {
14 @property(retain) Foo_ref dict;
17 @implementation TestObject
21 @interface NSDictionary
25 int main(int argc, char *argv[]) {
26 NSDictionary *dictRef;
27 Foo_ref foo = (Foo_ref)dictRef;
29 // do Properties retain?
30 int before = [dictRef retainCount];
31 int after = [dictRef retainCount];
33 if ([foo retainCount] != [dictRef retainCount]) {
38 void (^block)(void) = ^{
41 before = [foo retainCount];
42 id save = [block copy];
43 after = [foo retainCount];
44 if (after <= before) {