1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
---|---|
2 | // expected-no-diagnostics |
3 | struct HasValueType { |
4 | typedef int value_type; |
5 | }; |
6 | |
7 | __attribute__((objc_root_class)) |
8 | @interface Foo |
9 | { |
10 | @protected |
11 | HasValueType foo; |
12 | } |
13 | |
14 | @property (nonatomic) HasValueType bar; |
15 | @end |
16 | |
17 | @implementation Foo |
18 | @synthesize bar; |
19 | |
20 | - (void)test { |
21 | decltype(foo)::value_type vt1; |
22 | decltype(self->foo)::value_type vt2; |
23 | decltype(self.bar)::value_type vt3; |
24 | } |
25 | @end |
26 |