summaryrefslogtreecommitdiffstats
path: root/test/SemaObjCXX/properties.mm
blob: f148b3395d9364ce582ee5d68776bc1ee3d242e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -fsyntax-only -verify %s

struct X { 
  void f() const;
  ~X();
};

@interface A {
  X x_;
}

- (const X&)x;
- (void)setx:(const X&)other;
@end

@implementation A

- (const X&)x { return x_; }
- (void)setx:(const X&)other { x_ = other; }
- (void)method {
  self.x.f();
} 
@end

OpenPOWER on IntegriCloud