Created
January 21, 2013 21:29
-
-
Save mootoh/4589612 to your computer and use it in GitHub Desktop.
Mixing lower/upper case properties confuses clang.
This file contains hidden or 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 A : NSObject | |
| { | |
| NSString *lowercaseString; | |
| NSString *LowercaseString; | |
| } | |
| @property (strong) NSString *lowercaseString; | |
| @property (strong) NSString *LowercaseString; | |
| @end | |
| @implementation A | |
| @synthesize lowercaseString; | |
| @synthesize LowercaseString; | |
| - (id) init | |
| { | |
| self = [super init]; | |
| if (self) { | |
| self.lowercaseString = @"lower"; | |
| self.LowercaseString = @"UPPER"; | |
| NSLog(@"value = %@", self.lowercaseString); | |
| NSLog(@"value = %@", self.LowercaseString); | |
| } | |
| return self; | |
| } | |
| @end | |
| int main(int argc, char **argv) | |
| { | |
| A *a = [A new]; // will show "Yay" | |
| } |
mootoh
commented
Jan 21, 2013
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment