-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix: Using TypeBuilder as generic argument for a parent type throws #99771
Conversation
{ | ||
return default; | ||
} | ||
|
||
return GetMemberReferenceHandle(member); | ||
} | ||
|
||
private static bool IsConstructedFromNotBakedTypeBuilder(Type type) => type.IsConstructedGenericType && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Do you publish somewhere information in which version of dotnet/nugets it will be released? |
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. |
Fix a bug: having a parent, that is a generic type that uses a TypeBuilder as generic argument throws on
TypeBuidler.CreateType()
.Fixes #99505