1 | #import <objc/NSObject.h> |
---|---|
2 | |
3 | @interface Foo : NSObject { |
4 | } |
5 | -(int)get; |
6 | @end |
7 | |
8 | @implementation Foo |
9 | -(int)get |
10 | { |
11 | return 1; |
12 | } |
13 | @end |
14 | |
15 | @interface Bar : Foo { |
16 | } |
17 | -(int)get; |
18 | @end |
19 | |
20 | @implementation Bar |
21 | -(int)get |
22 | { |
23 | return 2; |
24 | } |
25 | |
26 | -(int)callme |
27 | { |
28 | return [self get]; // Set breakpoint here. |
29 | } |
30 | @end |
31 | |
32 | int main() |
33 | { |
34 | @autoreleasepool |
35 | { |
36 | Bar *bar = [Bar alloc]; |
37 | return [bar callme]; |
38 | } |
39 | } |
40 |