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

ILLink handling of Type.GetType doesn't resolve types from corelib #103906

Closed
sbomer opened this issue Jun 24, 2024 · 1 comment · Fixed by #104060
Closed

ILLink handling of Type.GetType doesn't resolve types from corelib #103906

sbomer opened this issue Jun 24, 2024 · 1 comment · Fixed by #104060
Assignees
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Milestone

Comments

@sbomer
Copy link
Member

sbomer commented Jun 24, 2024

Repro:

using System;
var t = Type.GetType("G`1[[System.Int32]]");
Console.WriteLine(t.ToString());

class G<T> {}

If this app is published as PublishTrimmed, the app nullrefs on t.ToString() because ILLink's intrinsic handling for type names did not resolve System.Int32 and as a result didn't mark the type G.

@sbomer sbomer added this to the 9.0.0 milestone Jun 24, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 24, 2024
@sbomer sbomer added area-Tools-ILLink .NET linker development as well as trimming analyzers and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 24, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@sbomer sbomer self-assigned this Jun 24, 2024
@sbomer sbomer closed this as completed in 9407c9c Jul 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant