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

Update 'use collection expression' to support cases where switching to a collection expr will pick a ROS overload over an array one. #74934

Merged
merged 16 commits into from
Aug 29, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #74931

LDM and runtime position is that if overloads are added that differ only in taking a ROS vs an array for a particular parameter, that the ROS version is the desirable one to call (we're even encoding that into overload resolution rules). So, if existing code is manually constructing arrays, still offer to use a collection expression so that you actually move to teh better overload.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner August 28, 2024 20:10
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 28, 2024
@CyrusNajmabadi CyrusNajmabadi changed the title Update 'use collection expressoin' to support cases where switching to a collection expr will pick a ROS overload over an array one. Update 'use collection expression' to support cases where switching to a collection expr will pick a ROS overload over an array one. Aug 28, 2024
Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

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

:shipit:

@CyrusNajmabadi CyrusNajmabadi merged commit 14f5b27 into dotnet:main Aug 29, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Aug 29, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the arrayROS branch August 29, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offer "Use collection expressions" when the chosen overload would switch
3 participants