Skip to content

DynamicallyAccessMemberType.PublicNestedTypes behavior discussion #1174

@vitek-karas

Description

@vitek-karas

If the DynamicallyAccessedMemberTypes.PublicNestedTypes is used (same applies to NonPublicNestedTypes) we will only "mark" the nested types - which includes the bare minimum about the type. So it will make the Type.GetNestedType work, but it's very unlikely that the calling code will end up working overall as the type as marked is effectively useless (no methods, no .ctors, nothing really).

It's true that in the current state the user code would get lot of warnings anyway as any action on the type returned by Type.GetNestedType will result in a warning. So in that sense the behavior is still correct, but it makes the PublicNestedTypes/NonPublicNestedType enum values borderline useless.

/cc @MichalStrehovsky @sbomer @tlakollo @marek-safar @eerhardt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions