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 tests for out and ref parameter data flow #2633

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

vitek-karas
Copy link
Member

This adds tests for dotnet/runtime#101734

[ExpectedWarning ("IL2072", nameof (TryGetAnnotatedValue))]
[ExpectedWarning ("IL2072", nameof (TryGetAnnotatedValue))]
// https://github.com/dotnet/linker/issues/2632
// This second warning should not be generated, the value of typeWithMethods should have PublicMethods
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: third warning

typeWithMethods.RequiresPublicMethods ();
}

[ExpectedWarning ("IL2072", nameof (TryGetAnnotatedValue))]
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: TryGetAnnotatedValueFromValue to be consistent, not actually important from the standpoint of the testing infra

[ExpectedWarning ("IL2072", nameof (TryGetAnnotatedValue))]
// https://github.com/dotnet/linker/issues/2632
// This second warning should not be generated, the value of typeWithMethods should have PublicMethods
// after the call with out parameter.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: with ref parameter

[ExpectedWarning ("IL2072", nameof (TryGetAnnotatedValue))]
[ExpectedWarning ("IL2072", nameof (TryGetAnnotatedValue))]
// https://github.com/dotnet/linker/issues/2632
// This second warning should not be generated, the value of typeWithMethods should have PublicMethods
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: third

@vitek-karas vitek-karas merged commit d485336 into dotnet:main Feb 21, 2022
@vitek-karas vitek-karas deleted the AddOutParamTests branch February 21, 2022 10:57
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants