Don't lose attributes of method parameters#13800
Draft
alfonsogarciacaro wants to merge 3 commits intodotnet:mainfrom
Draft
Don't lose attributes of method parameters#13800alfonsogarciacaro wants to merge 3 commits intodotnet:mainfrom
alfonsogarciacaro wants to merge 3 commits intodotnet:mainfrom
Conversation
Member
|
I merged latest main into this branch - I'd really like to see this picked up again. Attributes are more and more critical for tooling to support features like StringSyntax. |
Member
|
A big question though is how IL attributes should be represented here - is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.GetParamAttribsactually 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!