Skip to content
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

Documentation states that "type inference proceeds one parameter list at a time" but this is not true in Scala 3. #2648

Open
smarter opened this issue Nov 21, 2022 · 2 comments
Assignees
Labels
Bug scala-3 scala 3 documentation

Comments

@smarter
Copy link
Member

smarter commented Nov 21, 2022

This is stated in https://docs.scala-lang.org/tour/multiple-parameter-lists.html but while this mostly applies to Scala 2, it doesn't apply at all to Scala 3 where type variables are inferred as late as possible (but not later than needed) regardless of parameter lists. I discuss the differences between Scala 2 and 3 here in my talk on type inference: https://youtu.be/lMvOykNQ4zs?t=1216

@julienrf
Copy link
Contributor

Could you suggest what should be the appropriate explanation in Scala 2 and in Scala 3?

@smarter
Copy link
Member Author

smarter commented Nov 21, 2022

I would just completely remove the "Drive type inference" section, or make it Scala 2 specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug scala-3 scala 3 documentation
Projects
None yet
Development

No branches or pull requests

3 participants