Created
January 7, 2013 22:04
-
-
Save armadsen/4478942 to your computer and use it in GitHub Desktop.
Demonstrates a class with an ivar and @Property with the same name. See http://stackoverflow.com/questions/14204534/issue-with-ivar/14204661#14204678
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 MyClass : NSObject | |
{ | |
id varA; | |
} | |
@property (nonatomic, strong) id varA; | |
@end | |
@implementation MyClass | |
@synthesize varA = _varA; | |
@end | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
[[[MyClass alloc] init] self]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment