Skip to content
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

Undocumented items copy declaration from documented parent #864

Closed
reitzig opened this issue Jul 27, 2017 · 3 comments
Closed

Undocumented items copy declaration from documented parent #864

reitzig opened this issue Jul 27, 2017 · 3 comments
Labels

Comments

@reitzig
Copy link

reitzig commented Jul 27, 2017

For code like this:

public protocol Foo {
    associatedtype Bar
    var bar: Bar { get }
}

Jazzy will not show Bar at all.

If we add documentation on Foo:

/// A foo!
public protocol Foo {
    associatedtype Bar: Hashable
    var bar: Bar { get }
}

Jazzy copies its declaration over to bar:

screen shot 2017-07-27 at 11 56 04

@reitzig
Copy link
Author

reitzig commented Jul 27, 2017

Actually, I see undocumented properties getting the declaration of their enclosing type in other places, too, so this may not be related to the associated type.

@johnfairh johnfairh added the bug label Jul 28, 2017
@johnfairh
Copy link
Collaborator

The missing associatedtype is a SourceKit bug. If you put a doc-comment on it then sourcekitten will work around & find it. The wrong declaration is a bug in the jazzy mustache templates, looks like it should say .declaration to avoid inheriting from the parent.

@johnfairh johnfairh changed the title Undocumented associated types get handled badly Undocumented items copy declaration from documented parent Jul 28, 2017
@johnfairh
Copy link
Collaborator

Fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants