Support generic fields in PersistedAssemblyBuilder#110372
Support generic fields in PersistedAssemblyBuilder#110372steveharter merged 5 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.
Comments skipped due to low confidence (1)
src/libraries/System.Reflection.Emit/tests/PersistedAssemblyBuilder/AssemblySaveTypeBuilderTests.cs:244
- The constructor call should use Type.EmptyTypes for clarity and to avoid potential issues with different runtime environments.
il.Emit(OpCodes.Newobj, declaringType.GetConstructor([]));
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs
Outdated
Show resolved
Hide resolved
|
/backport to release/9.0-staging |
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12415232737 |
|
@jkotas @steveharter - do you think we need to add more test cases to cover other permutations of generic usage? Methods / properties / events / parameters, nested generics, etc. |
|
It is a lot of potentially interesting permutations. The chances of more broken corner-cases being found by manual test authoring are low. I think that the best way to find more broken corner-cases is roundtripping of the existing test asserts through ref.emit and validating that the roundtripped tests still pass. Buya has done some of it, but it was not completed and automated. |
I added as much test as I can that covers many permutations of generic usage and nested generics for We don't have tests that calling generic |
Fixes #110247
cc @jgh07
We will likely port to v9.x once verified in v10 since this was new functionality in v9.