You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take defult parameters into account for overloading resolution.
The current Scala spec only considers methods without default parameters
for overloading resolution (unless only a single one remains anyway after
filtering by shape). This is needlessly restrictive. But dropping this
restriction (as dotty does) can lead to ambiguity errors, which is why
run/t8197 did not compile anymore.
We fix the problem by a last try rule: If after asSpecific tests there are
still several alternatives, and only one of them is without default arguments,
pick that one.
I tried an alternative rule which would make the distinction on default params
earlier but that one fails for the overloaded tree copier functions in Trees.scala
(the method with default parameters is also the one which is more specific).
0 commit comments