-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Semi-Fix scaladoc of extensions methods #14321
Conversation
Uses the assumption that there is the following "pos hierachy": extension paramss < DefDef < extMethod paramss
19ef092
to
36b5c8a
Compare
def nonUsingClauses(clauses: List[reflect.ParamClause]) = clauses.zipWithIndex.collect{case (terms: reflect.TermParamClause, i) if !terms.isGiven => (terms, i)} | ||
val extNonUsingClause = nonUsingClauses(extPart) | ||
val defNonUsingClauses = nonUsingClauses(defPart) | ||
assert(extNonUsingClause.size == 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assert seems to be causing some of the tests to fail, but I don't understand why
@@ -152,52 +160,68 @@ object SymOps: | |||
else termParamss(1).params(0) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extendedSymbol
should probably also be updated, as it implicitly uses the old heuristic
…4810) Before this changes, it wouldn't generate due to incorrect extension parameters extractor functions. It also implements new heuristic to distinct extensions and method parameters based on definition position. Also fixed type parameter coloring by adding new css rule, to match doc style. Based on #14321 , it should be closed after this PR is merged. Documentation for test `tests.extensionParams` ![image](https://user-images.githubusercontent.com/48657087/160649612-ac5b1883-0e28-4acb-9886-c9108b376665.png)
This changes the heuristic used by scaladoc to one I was not able to fault (smarter people might)
(à propos, the main idea behind the heuristic was @smarter's)
Note that it is not enough for tests to pass, as
unwrapMemberInfo
is also incorrect, but I do not have the time to fix itThe commits are neatly split and annotated, so it should be relatively easy to understand what I did
I left some commented
println
s, they highlight that the new heuristic works correctly, and howunwrapMemberInfo
is incorrect, for example withf1
from the rehabilitated testextensionParams
:file:
cleaned up output: