Xcode Cannot Generate Documentation Comments for Failable Swift Initializers
Originator: | butler.grant.j | ||
Number: | rdar://36876446 | Date Originated: | 25-Jan-2018 2:34 PM |
Status: | Closed | Resolved: | Resolved |
Product: | Developer Tools | Product Version: | Xcode 9.2 (9C40b), macOS Sierra 10.12.6 (16G1114) |
Classification: | UI/Usability | Reproducible: | Always |
Summary: When using Xcode's built in documentation comment generator (Editor>Structure>Add Documentation), if you are trying to add documentation to a failable Swift initializer, Xcode will fail to generate the comment with the error "Nothing found to document at the current location." If the initializer is made to not be failable, then Xcode can generate the comment. Steps to Reproduce: 1. Have a Swift class/enum/struct with a failable initializer. 2. Add a documentation comment using the "Add Documentation" menu item (or its equivalent keyboard shortcut) Expected Results: The appropriate documentation comment stub is generated by Xcode and inserted into my source code. Actual Results: Xcode shows the error "Nothing found to document at the current location" Version/Build: Xcode 9.2 (9C40b) macOS Sierra 10.12.6 (16G1114) Github Repo: https://github.com/grantjbutler/radars/tree/master/36876446
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!