Skip to content
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

SemanticModel.GetArgumentInfo API needed to retrieve the IParameterSymbol that an ArgumentSyntax binds to #9

Closed
DustinCampbell opened this issue Jan 15, 2015 · 4 comments
Labels
Area-Compilers Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature Request
Milestone

Comments

@DustinCampbell
Copy link
Member

This is a missing API. Writing a diagnostic that process an argument requires a fair amount of code to determine what parameter the argument binds to -- checking for named or positional arguments.

@DustinCampbell DustinCampbell added Concept-API This issue involves adding, removing, clarification, or modification of an API. enhancement labels Jan 15, 2015
@theoy theoy added this to the Unknown milestone Jan 15, 2015
rchande pushed a commit that referenced this issue May 4, 2015
Ensure that cref completion uses Speculative SemanticModel. Fixes TFS #9...
@dbolkensteyn
Copy link

  • the variable-argument (params) use case should also be dealt with when positional arguments are used.

@DustinCampbell
Copy link
Member Author

@dbolkensteyn, certainly! Here's an example of what I did in C# Essentials, which is how this API might look:

https://github.com/DustinCampbell/CSharpEssentials/blob/master/Source/CSharpEssentials/Extensions.cs#L45-L137

@Youssef1313
Copy link
Member

Is IArgumentOperation.Parameter not enough here?

@CyrusNajmabadi
Copy link
Member

Yes. I think we can close this now that we have ioperation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature Request
Projects
None yet
Development

No branches or pull requests

7 participants