Don't lose attributes of method parameters #13800
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to fix #13786
The problem is
MethInfo.GetParamAttribs
actually discards the param attributes (instead it gets info that's usually expressed with attributes in F# like byref, default value, etc). I've tried to make the minimal changes I needed to fix the problem that was blocking Fable 4, but I guess a more consistent solution would be better (e.g. properties still have the same problem and are not addressed in this PR).So I'm just sending this PR for reference. Please feel free to close if you can find a better way to solve the issue (or provide me guidance on how to do it).
Thanks!