mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
The problem was that he number of mask parameters for defaults when generating methods declaration was being calculated upon resulting signature (with additional parameters: extension receivers, enum name/ordinal), while on call-sites the masks number was calculated by the arguments number in resolved call, i.e. by the number of real value parameters. And because of the additional synthetic parameters (like enum.ordinal) these two numbers could be different. The solution is just to use value parameters number in both places. Note, that we only count value parameters from the original sourse declaration, ignoring synthetic ones generated by backend (e.g. Continuation for suspend functions) #KT-14565 Fixed