Mercurial > hg > CbC > CbC_llvm
annotate clang/test/SemaObjC/getter-setter-defined-in-category-of-parent.m @ 180:680fa57a2f20
fix compile errors.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 30 May 2020 17:44:06 +0900 |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
2 // expected-no-diagnostics | |
3 | |
4 @interface MyParent { | |
5 int X; | |
6 } | |
7 @end | |
8 @implementation MyParent | |
9 @end | |
10 | |
11 @interface MyParent(AA) { | |
12 } | |
13 @end | |
14 @implementation MyParent (AA) | |
15 - (void) setX: (int)in {X = in - 2;} | |
16 - (int) X {return X;} | |
17 @end | |
18 | |
19 @interface MyClass : MyParent | |
20 @end | |
21 @implementation MyClass | |
22 @end | |
23 | |
24 int foo(MyClass *o) { | |
25 o.X = 2; | |
26 return o.X; | |
27 } |