XCode 6.2 broke objective-c properties
| Originator: | guidomb | ||
| Number: | rdar://20250680 | Date Originated: | 21/03/2015 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 6.2 |
| Classification: | Bug | Reproducible: | Yes |
Summary: In XCode 6.2 when you override a property's getter or setter method the implicit instance variable generated by the compiler disappears generating a compile error with the message: "Use of undeclared identifier". One way to solve this issue is to add @synthesize myProperty = _myProperty; Steps to Reproduce: 1. Create a new class 2. add a property like @property (nonatomic) NSURL * myURL; 3. Override getter 4. Reference _myURL inside getter Expected Results: Being able to reference instance variable _myURL for example for lazy initialization inside the getter method Actual Results: Compile error: Use of undeclared identifier '_myURL' Version: Version 6.2 (6C131e)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!