Swift generated attributes do not follow optional check box in model file
| Originator: | brianaking | ||
| Number: | rdar://27196128 | Date Originated: | 06-Jul-2016 11:43 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 8 beta 2 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: The optionality of the properties generated in the code does not match the optionality of the attribute in the model file. Scalar attributes appear to always be specified as non-optional, and non-scalar types appear to always be generated as optional. Steps to Reproduce: Create a set of properties with varied scalar checks and optional checks. Expected Results: The optionality of the properties generated in the code should match the optionality of the attribute in the model file. scalar or non scalar should not influence the optionality of the property. If you manually write the properties, optional and non optional Int16 properties work fine and optional an non optional NSNumber properties work fine. Actual Results: The optional check box does not influence the optionality. Regression: This is not a regression Notes: Provide additional information, such as references to related problems, workarounds and relevant attachments.
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!