Uh oh!
There was an error while loading. Please reload this page.
[WIP] fix for property setter called with argument name - #16038
[WIP] fix for property setter called with argument name#16038smoothdeveloper wants to merge 2 commits into
Conversation
smoothdeveloper
commented
Sep 25, 2023
The change breaks nothing, but I doubt there is enough coverage on indexed properties setters. My opinion in favour of supporting the construct (using normal suggestion process):
In meantime, it remains a minor hindrance which has a work around: @dsyme would you mind sharing:
|
vzarytovskii
commented
Sep 26, 2023
@smoothdeveloper Is it still |
smoothdeveloper
commented
Sep 26, 2023
@vzarytovskii, let me put all my trust in I'll add more coverage on the behaviour in #16035. |
psfinaki
commented
Sep 26, 2023
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
edgarfgp
commented
Sep 26, 2023
Out of curiosity. Will this also for multiple indexes ? typeT()=memberx.indexed1with get (a1:obj)=
printfn $"T().indexed1 {a1} !\t%03i{i}"1andset(a1:obj,a2:obj)(value:int)=
printfn $"T().indexed1 {a1} <- {value} !\t%03i{i}"lett= T()
t.indexed1(a1="ok", a2 ="")<-1 |
smoothdeveloper
commented
Sep 26, 2023
@edgarfgp it doesn't fix the crash for this particular case 😞, nor for adjusting the getter to have both a1 & a2. So it is sadly not a complete fix, I need to look more into it, I think it is related to tupled arguments. Thanks for sharing the sample. |
I'm having similar problems in #16023 when there is an Indexer property with multiple indexes. It seems that current logic does not consider a setter as part of the property |
smoothdeveloper
commented
Sep 27, 2023
The crash occurs in place where we check for parameter supporting Can someone confirm to me that the only place an indexed setter can accept param array is the last before
What is odd is that there is an assumption that the "possibleParamArg" is going to be among the unnamedCalledArgs, but this can't hold for sure: it is perfectly possible to call the indexed setter by naming all the arguments but Going to thinker more, will take some time before I'm confident of not just fixing the simplest case :) |
smoothdeveloper
commented
Oct 1, 2023
Closing, same reason as #16035 |
Related issue: #16034
Instead of internal error (which our test infrastructure cannot assert against), it now gives:
I never encountered this message, if anyone can clarify this is intended behaviour.
sample code:
Just checking for now that it doesn't break CI.