Skip to content

Don't lose attributes of method parameters #13800

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alfonsogarciacaro
Copy link
Contributor

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!

@baronfel
Copy link
Member

baronfel commented Sep 6, 2023

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.

@baronfel
Copy link
Member

baronfel commented Sep 6, 2023

A big question though is how IL attributes should be represented here - is Attribs the correct type here? Is there a way to convert the attribute data on IL methods to Attrib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

FSharpMemberOrFunctionOrValue doesn't include attributes for params in CurriedParameterGroups
2 participants