-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem parsing generic function parameters when function split over multiple lines #896
Comments
I think this happens for all multi-line function declarations inside protocols, the generic types look like a coincidence. |
This turns out to be tough to completely fix. SourceKitten normally uses the 'body offset' key to know when the declaration ends, which is absent for protocol methods. A rule like for functions without 'body offset', use 'length' works correctly in the example here, but it turns out 'length' does not include any With PR #902 as-is, these function definitions show up entirely but all on one long line, which is correct but ugly. Could add a ghastly rule there, assuming the sourcekitten change [ie. respect multi-line but always drop |
I fixed the underlying Swift problem with |
Jazzy has a workaround for this now, prints the function on a single line. Trying to do the 'real' fix found another Swift bug causing a separate regression: will have to wait another cycle. |
OK thanks for the update |
Fixed in master (with a Swift 5.1+ project) |
When documenting the following definition the following is parsed fine:
But if the function is broken over several lines it gets truncated in the docs:
This problem doesn't appear to happen if the function parameters don't include any generic definitions.
Thanks
Mark
The text was updated successfully, but these errors were encountered: