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

Add handling of params collections for natural delegate types #71334

Merged

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

@AlekseyTs AlekseyTs requested a review from a team as a code owner December 19, 2023 01:35
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Dec 19, 2023
@AlekseyTs
Copy link
Contributor Author

@333fred, @dotnet/roslyn-compiler Please review.

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

Done review pass.

@AlekseyTs
Copy link
Contributor Author

@333fred Please take another look.

@AlekseyTs
Copy link
Contributor Author

@333fred, @dotnet/roslyn-compiler Please review.

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

Minor grammar comment, otherwise LGTM.

…bols/AnonymousType.DelegatePublicSymbol.cs

Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For the second review.

4 similar comments
@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For the second review.

@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For the second review.

@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For the second review.

@AlekseyTs
Copy link
Contributor Author

@dotnet/roslyn-compiler For the second review.

@AlekseyTs
Copy link
Contributor Author

@RikkiGibson, @dotnet/roslyn-compiler For the second review

@jaredpar
Copy link
Member

jaredpar commented Jan 3, 2024

Is this meant to address #71333?

@AlekseyTs
Copy link
Contributor Author

Is this meant to address #71333?

No. This is an unrelated change

@AlekseyTs
Copy link
Contributor Author

@RikkiGibson, @dotnet/roslyn-compiler For the second review

@RikkiGibson RikkiGibson self-assigned this Jan 5, 2024
var src1 = @"
public class Params
{
static public void Test1(params System.ReadOnlySpan<long> a) {}
Copy link
Contributor

@RikkiGibson RikkiGibson Jan 5, 2024

Choose a reason for hiding this comment

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

Do we have any test for a scenario like the following? Would such a test be useful? No need to take any action in this PR, just want to have the test plan item written down if applicable.

// comp1
public delegate void Del(params IEnumerable<int> e);
public static void Test1(Del del) { }

// comp2
public static void Main()
{
    Test1(e => { });
}
``` #Pending

Copy link
Contributor Author

@AlekseyTs AlekseyTs Jan 5, 2024

Choose a reason for hiding this comment

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

Would such a test be useful?

During an offline conversation we arrived to the answer that it would be interesting to verify whether any language version diagnostics going to be reported on the Test1 invocation in the second compilation. Since the scenario is not primarily related to the changes made in this PR, I am not going to add a test like this here. But, I will incorporate it to one of my next PRs.

…s.cs

Co-authored-by: Rikki Gibson <rikkigibson@gmail.com>
@AlekseyTs AlekseyTs enabled auto-merge (squash) January 5, 2024 23:08
@AlekseyTs AlekseyTs merged commit 0e16ec0 into dotnet:features/ParamsCollections Jan 6, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - ParamsCollections untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants