aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/lang/objc/objc-ivar-protocols/main.m
blob: 905587fdda1c777173a29aa817d13c04f1896056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#import <Foundation/Foundation.h>

@protocol MyProtocol
-(void)aMethod;
@end

@interface MyClass : NSObject {
  id <MyProtocol> myId;
  NSObject <MyProtocol> *myObject;
};

-(void)doSomething;

@end

@implementation MyClass

-(void)doSomething
{
  NSLog(@"Hello"); //% self.expect("expression -- myId", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["id"]);
                   //% self.expect("expression -- myObject", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["NSObject"]);
}

@end

int main ()
{
  @autoreleasepool
  {
    MyClass *c = [MyClass new];
    [c doSomething];
  }
}