Skip to content

Cascade between position record parameters and properties.#59293

Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:positionalRecordCascade
Feb 7, 2022
Merged

Cascade between position record parameters and properties.#59293
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:positionalRecordCascade

Conversation

@CyrusNajmabadi
Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi commented Feb 4, 2022

Fixes #44559

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner February 4, 2022 20:37
@ghost ghost added the Area-IDE label Feb 4, 2022
@RikkiGibson
Copy link
Member

Talking offline, we think it would be ideal for the compiler to expose public APIs which let the IDE do the right thing here for both source and metadata scenarios.

For example, if a record Rec is declared in a referenced assembly:

var rec = new Rec(param: 1); // find-all-refs on "param" here
_ = rec.param.M(); // should include 'param' in results

I'm going to take a stab at coming up with public API that would address the scenario and we can bring it to API review.

Copy link
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll still probably get complaints about this until the new API is available, but good to make at least some scenarios better in the meantime.

Does this also fix #50450? or even #44560 maybe?

@CyrusNajmabadi CyrusNajmabadi merged commit 4224320 into dotnet:main Feb 7, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the positionalRecordCascade branch February 7, 2022 15:59
@ghost ghost added this to the Next milestone Feb 7, 2022
@CyrusNajmabadi
Copy link
Contributor Author

Does this also fix #50450? or even #44560 maybe?

Very likely. I'll check today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FindAllReferences should find usages of positional members

3 participants