-
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
Switch mapping of context bounds to using clauses in 3.6 #21257
Conversation
This needs a change in scaladoc to recognize using clauses with evidence parameters as context bounds. Right now it seems the logic is that a context bound is recognized only if the evidence parameter is an implicit. @Florian3k can you take this on? Alternatively, who else is working on scaladoc these days? |
Mikołaj is currently having ~2 weeks off to focus on his thesis, @Gedochao we might need to look for some else to handle the issue |
Nobody else AFAIK. So it's fair game for anyone, if Mikołaj isn't available. |
Shouldn't this be a quick fix around https://github.com/scala/scala3/blob/main/scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala#L633 ? Last PR that touched it was #13172 We can either wait for him or try to fix it here (I think you have most context about the change and could probably change it quickest though) |
Was future before.
ba82d69
to
b8f9c2c
Compare
If we have a function like ```scala def foo[X: CB](...)(implicit x: T) ``` always map context bounds to implicit parameters, irrespective of version. Likewise, if we have a function ``scala def foo[X: CB](...)(using x: T) ``` always map context bounds to "using" parameters, irrespective of version. This avoids mixing implicit and using in one parameter list.
@KacperFKorban Thanks for the pointers! |
Was future before.
We can roll this out now, since we already made it an error in 3.5 to pass a normal argument to a using clause. It would be good to roll this out now since otherwise context bounds would represent an exception to the implicit priority inversion in #19300.
See discussion at the end of #19300 for details.