Last active
December 16, 2015 17:09
-
-
Save dive/5468550 to your computer and use it in GitHub Desktop.
Self abandoned by self abandoned.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface TestSelfSelfer : NSObject | |
@property (nonatomic, strong) NSString *string; | |
@property (nonatomic, strong) TestSelfSelfer *sself; | |
@end | |
@implementation TestSelfSelfer | |
- (void)selfSelfer | |
{ | |
self.string = @"Hello!"; | |
NSLog(@"1. %@", | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.self.self.self.self.self.self.self.self.self. \ | |
self.string | |
); | |
NSLog(@"2. %@", [[self.string.self.self.self.self self].self self]); | |
self.sself = self; | |
NSLog(@"3. %@", self.sself.self.sself.self.sself.self.string); | |
NSLog(@"4. %@", super.self.sself.self.string.self); | |
} | |
@end | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
TestSelfSelfer *testSelfSelfer = [TestSelfSelfer new]; | |
[testSelfSelfer selfSelfer]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment