scala / docs.scala-lang

The Scala Documentation website
http://docs.scala-lang.org
561 stars 1.02k forks source link

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

Open smarter opened 1 year ago

smarter commented 1 year ago

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 commented 1 year ago

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

smarter commented 1 year ago

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