aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/objc/objc-super/class.m')
-rw-r--r--packages/Python/lldbsuite/test/lang/objc/objc-super/class.m39
1 files changed, 39 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m b/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m
new file mode 100644
index 000000000000..b55b649aaaec
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/objc/objc-super/class.m
@@ -0,0 +1,39 @@
+#import <Foundation/Foundation.h>
+
+@interface Foo : NSObject {
+}
+-(int)get;
+@end
+
+@implementation Foo
+-(int)get
+{
+ return 1;
+}
+@end
+
+@interface Bar : Foo {
+}
+-(int)get;
+@end
+
+@implementation Bar
+-(int)get
+{
+ return 2;
+}
+
+-(int)callme
+{
+ return [self get]; // Set breakpoint here.
+}
+@end
+
+int main()
+{
+ @autoreleasepool
+ {
+ Bar *bar = [Bar alloc];
+ return [bar callme];
+ }
+}