scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

Resolve overloading: keep track of prefix and indices of all default getters

Open odersky opened this issue 3 years ago • 0 comments

Fixes #16006 Fixes #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.

odersky avatar Sep 09 '22 12:09 odersky