-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] fix for property setter called with argument name #16038
Conversation
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:
|
@smoothdeveloper Is it still |
@vzarytovskii, let me put all my trust in I'll add more coverage on the behaviour in #16035. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Out of curiosity. Will this also for multiple indexes ? type T() =
member x.indexed1
with get (a1: obj) =
printfn $"T().indexed1 {a1} !\t%03i{i}"
1
and set (a1: obj, a2: obj) (value: int) =
printfn $"T().indexed1 {a1} <- {value} !\t%03i{i}"
let t = T()
t.indexed1(a1="ok", a2 = "") <- 1 |
@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 |
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 :) |
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.