Closed kuanyingchou closed 2 months ago
does this impact any of your use cases? I think the name itself is not well defined in spec, therefore this is an either way works case, let me know if you have code that directly depends on the name of this setter parameter.
Ah, in XProcessing we keep the parameter name user defined and change it to "p0" if we see "<set-?>" as it's not valid in source. With this change this logic doesn't work anymore because we don't know if "value" is user-defined or not. Or is there other ways to tell?
you can check on the origin of the KSValueParameter
of the property setter, I got the following output from your repro, does this help?
SYNTHETIC
KOTLIN_LIB
Per discussion offline, let's
Yes, checking the origin as well as consistent names both work for us. Thanks!
In KSP2 the parameter name of property setters is
value
when the origin isKOTLIN_LIB
but is<set-?>
when the origin isKOTLIN
, while it was always<set-?>
in KSP1.Repro: https://github.com/kuanyingchou/ksp/commit/49600e0fd5933bee4338eaee9b7b7dfe86636fa8