Autolink member properties and methods in class documentation
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.
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 ..
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.