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

Autolink member properties and methods in class documentation #865

Open
reitzig opened this issue Jul 27, 2017 · 2 comments
Open

Autolink member properties and methods in class documentation #865

reitzig opened this issue Jul 27, 2017 · 2 comments

Comments

@reitzig
Copy link

reitzig commented Jul 27, 2017

For code like this:

/**
	Use `bar(...)`!
*/
class Foo {
	func bar() {}

	/**
		- Seealso: `bar(...)`
	*/
	fun spa() {}
}

bar will be autolinked in the documentation of spa, but not that of Foo.

@johnfairh
Copy link
Collaborator

In Foo's comment, `bar(...)` refers to the function named bar at the same scope. To refer to the method needs Foo.bar(...).

I can imagine searching both scopes but I don't think it's a good idea because of the ambiguity. I can see the usability of not repeating Foo though. An enhancement might be to permit a leading . in autolinked identifiers to mean "within this declaration's scope". And I guess not render the ..

@reitzig
Copy link
Author

reitzig commented Jul 28, 2017

Oh, I see. For me, intuitively, the documentation of the class is at class scope. Similar to how method properties are in-scope in the method documentation (but not at the same scope as the method).

Leading dots would read weirdly in source because that syntax is associated with enum instances.

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

No branches or pull requests

2 participants