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

[release/6.0] Add static constructor behavior for RUC on type (port of #2207) #2222

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

vitek-karas
Copy link
Member

Port #2207 to release/6.0

Add new error code for cases in which the static constructor is
annotated with RUC
Add IL2116 to error codes
Move static constructor verification in MarkField before pushing a new
stack to print warnings in the method caller instead of fields
Don't treat static constructors annotated with RUC as dangerous
Add test for several static constructor calls

Warn on field instead of warning on .cctor
* Field should warn no matter the DependencyKind except
DynamicallyAccessedMemberOnType
* Add test for Access to field via reflection, dynamic dependency and
using fields on attributes

Co-authored-by: vitek-karas <[email protected]>
@vitek-karas vitek-karas added this to the .NET 6.0 milestone Aug 23, 2021
@vitek-karas vitek-karas self-assigned this Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants