Skip to content

Scala3doc: extension methods are not grouped properly #10329

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

Closed
abgruszecki opened this issue Nov 16, 2020 · 4 comments · Fixed by #10334
Closed

Scala3doc: extension methods are not grouped properly #10329

abgruszecki opened this issue Nov 16, 2020 · 4 comments · Fixed by #10334

Comments

@abgruszecki
Copy link
Contributor

See https://scala3doc.virtuslab.com/pr-master/scala3/api/scala/opaques/array-ops/index.html.

Grouping extensions was based on positions. Since we implemented it, the implementation of extension methods was changed, so perhaps that is where the problem is?

@odersky
Copy link
Contributor

odersky commented Nov 16, 2020

The grouping should be based on the position of the leading parameter section. The leading parameter is the first parameter, except for right-associative methods, where it is the second parameter. (There's a parameter swap for right-associative operators when we go from collective extensions to internal extension methods). See method extensionParam in SymDenotations.scala.

The compiler also has code that depends on the grouping. See isLocalExtensionMethodRef in Typer.scala.

@pikinier20
Copy link
Contributor

@abgruszecki Prevoiously we were groupping by position, but I see that currently we are groupping by DRI of extended symbol (which changed recently) which is not quite good, because in arrayOps extensions on IArray[ConcreteType] are groupped in our docs. I'm gonna make a fix for this.

@abgruszecki
Copy link
Contributor Author

Reopening, the issues is still there.

@abgruszecki abgruszecki reopened this Nov 23, 2020
@abgruszecki
Copy link
Contributor Author

Correction: there's no bug on Scala3doc side, it merely duplicates the original source structure (which has a separate extension clause for each definition). My bad.

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

Successfully merging a pull request may close this issue.

3 participants