]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/python_api/objc_type/main.m
Vendor import of lldb trunk r256945:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / python_api / objc_type / main.m
1 //===-- main.m ------------------------------------------------*- ObjC -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #import <Foundation/Foundation.h>
11
12 @interface Foo: NSObject
13 {}
14 - (id) init;
15 @end
16
17 @interface Bar: Foo
18 {
19         int _iVar;
20 }
21 - (id) init;
22 @end
23
24 @implementation Foo
25
26 - (id) init
27 {
28         self = [super init];
29         return self;
30 }
31
32 @end
33
34 @implementation Bar
35
36 - (id) init
37 {
38         self = [super init];
39         if (self)
40                 self->_iVar = 5;
41         return self;
42 }
43
44 @end
45
46 int main()
47 {
48         Bar* aBar = [Bar new];
49         id nothing = [aBar noSuchSelector]; // Break at this line
50         return 0;
51 }
52