Skip to content

Scaladoc permits inheritDoc with different parameter names #18831

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

Open
som-snytt opened this issue Nov 2, 2023 · 2 comments
Open

Scaladoc permits inheritDoc with different parameter names #18831

som-snytt opened this issue Nov 2, 2023 · 2 comments

Comments

@som-snytt
Copy link
Contributor

Compiler version

3.3

Minimized code

mutable.HashMap#getOrElseUpdate renames parameter ops to defaultValue, but inheritDoc does not warn or adjust.

Output

Dottydoc improves on Scaladoc 2, which simply omits the spurious param.

Expectation

It would be nice to get a warning (I didn't actually check whether Dottydoc warns) or fix up the name @param name. (References in the doc text would require edits.)

Scaladoc 2 also does not cope.

@som-snytt som-snytt added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label prio:low area:doctool and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Nov 2, 2023
@som-snytt
Copy link
Contributor Author

More generally, dottydoc does not check the @param name. Noticed when I @deprecatedName: I fixed the compilation error with the new name, but there was no doc warning or error. (It would be fine to support correlating a deprecated name.)

@som-snytt
Copy link
Contributor Author

If anyone is thinking of fixing this (and if it's still an issue), the original symptom was fixed in mutable.Map by

 def getOrElseUpdate(key: K, @deprecatedName("op", since="2.13.13") defaultValue: => V): V

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

1 participant