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 generic signature issue when calling non generic method of closed generic type #96517

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

buyaa-n
Copy link
Member

@buyaa-n buyaa-n commented Jan 4, 2024

The method signature populated incorrectly for non generic method that declared within generic type and uses the generic parameters as return type or parameter.

For example, return type of ReadonlySpan<T>.Slice(int) method of an ReadonlySpan<char> instance should be closed generic ReadonlySpan<T> not ReadonlySpan<char>:

Fixes #96469

@ghost
Copy link

ghost commented Jan 4, 2024

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Issue Details

The method signature populated incorrectly for non generic method that declared within generic type and uses the generic parameters as return type or parameter.

For example, return type of ReadonlySpan<T>.Slice(int) method of an ReadonlySpan<char> instance should be closed generic ReadonlySpan<T> not ReadonlySpan<char>:

Fixes #96469

Author: buyaa-n
Assignees: -
Labels:

area-System.Reflection.Emit

Milestone: -

@stephentoub stephentoub merged commit 96851fc into dotnet:main Jan 8, 2024
109 of 111 checks passed
@buyaa-n buyaa-n deleted the generic-span branch January 8, 2024 17:38
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssemblyBuilderImpl.DefinePersistedAssembly has trouble with ReadOnlySpan methods
2 participants