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
Fixesscala#16006scala#16006 started failing since we now count the number of default parameters
for better precision in overloading resolution. But that count was wrong since
it did not take inherited default getters from overridden methods into account.
We fix this by setting the HasDefault flag also for parameters that don't have
a default value themselves, but that correspond to parameters with default
values in overridden methods.
…getters (#16009)
Fixes#16006Fixes#15287
When resolving overloading using parameter lists after the first one, we
used mapped
symbols that forgot about the prefix of the original call and how many
parameters were
skipped. Consequently, overloading resolution got confused when there
were default
parameters in following parameter lists. We now keep track of these
values in an
annotation that gets added to the mapped symbols.
We also use `findDefaultGetter` directly to compute the number of
default parameters
in `sizeFits`. The previous scheme of checking the `HasParam` flag of
parameters
fails for default values inherited from overriden methods.
Regression found in the Open CB #5274 for scalanlp/breeze
Bisect points to d2eeef1
Compiler version
Scala 3.2.2-RC1-bin-20220907-a503b7a-NIGHTLY
Minimized code
Output
In Scala 3.2.1-RC1
In nightly
Expectation
Should be decided if behaviour follows the specification and fixed.
The text was updated successfully, but these errors were encountered: