llvm-project/clang/test/SemaObjCXX/properties.mm

25 lines
297 B
Plaintext

// 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