Fix: Using TypeBuilder as generic argument for a parent type throws#99771
Merged
buyaa-n merged 4 commits intodotnet:mainfrom Mar 18, 2024
Merged
Fix: Using TypeBuilder as generic argument for a parent type throws#99771buyaa-n merged 4 commits intodotnet:mainfrom
buyaa-n merged 4 commits intodotnet:mainfrom
Conversation
buyaa-n
commented
Mar 14, 2024
| return GetMemberReferenceHandle(member); | ||
| } | ||
|
|
||
| private static bool IsConstructedFromNotBakedTypeBuilder(Type type) => type.IsConstructedGenericType && |
Contributor
Author
There was a problem hiding this comment.
These methods initially used for checking if constructed from a not baked TypeBuilder, but now the check for not baked part is removed and its used for all cases no matter if the TypeBuilder was baked or not
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Mar 15, 2024
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs
Outdated
Show resolved
Hide resolved
This was referenced Mar 15, 2024
20 tasks
|
Do you publish somewhere information in which version of dotnet/nugets it will be released? |
Contributor
Author
|
It will be included in preview 3, which will be released in mid-April. We do have release notes before release like https://github.com/dotnet/core/tree/main/release-notes/9.0/preview/preview2, but small bug fixes like this will not included. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a bug: having a parent, that is a generic type that uses a TypeBuilder as generic argument throws on
TypeBuidler.CreateType().Fixes #99505