| 1 | #import <objc/NSObject.h> |
| 2 | |
| 3 | class Base { |
| 4 | public: |
| 5 | int foo(int x, int y) { return 1; } |
| 6 | char bar(int x, char y) { return 2; } |
| 7 | void dat() {} |
| 8 | static int sfunc(char, int, float) { return 3; } |
| 9 | }; |
| 10 | |
| 11 | class Derived: public Base { |
| 12 | protected: |
| 13 | int dImpl() { return 1; } |
| 14 | public: |
| 15 | float baz(float b) { return b + 1.0; } |
| 16 | }; |
| 17 | |
| 18 | @interface Thingy: NSObject { |
| 19 | } |
| 20 | - (id)init; |
| 21 | - (id)fooWithBar: (int)bar andBaz:(id)baz; |
| 22 | @end |
| 23 | |
| 24 | @implementation Thingy { |
| 25 | } |
| 26 | - (id)init { |
| 27 | return (self = [super init]); |
| 28 | } |
| 29 | - (id)fooWithBar: (int)bar andBaz:(id)baz { |
| 30 | return nil; |
| 31 | } |
| 32 | @end |
| 33 | |
| 34 | int main() { |
| 35 | Derived d; |
| 36 | Thingy *thingy = [[Thingy alloc] init]; |
| 37 | return 0; // set breakpoint here |
| 38 | } |
| 39 | |