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

Fix: Using TypeBuilder as generic argument for a parent type throws #99771

Merged
merged 4 commits into from
Mar 18, 2024

Conversation

buyaa-n
Copy link
Contributor

@buyaa-n buyaa-n commented Mar 14, 2024

Fix a bug: having a parent, that is a generic type that uses a TypeBuilder as generic argument throws on TypeBuidler.CreateType().

Fixes #99505

{
return default;
}

return GetMemberReferenceHandle(member);
}

private static bool IsConstructedFromNotBakedTypeBuilder(Type type) => type.IsConstructedGenericType &&
Copy link
Contributor Author

@buyaa-n buyaa-n Mar 14, 2024

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

Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@buyaa-n buyaa-n merged commit a4faf10 into dotnet:main Mar 18, 2024
109 of 111 checks passed
@buyaa-n buyaa-n deleted the ctor-bug branch March 18, 2024 17:45
@mateuszradny
Copy link

Do you publish somewhere information in which version of dotnet/nugets it will be released?

@buyaa-n
Copy link
Contributor Author

buyaa-n commented Mar 21, 2024

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.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants