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

Open
sbomer opened this issue Jun 24, 2024 · 1 comment · May be fixed by #104060
Open

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

sbomer opened this issue Jun 24, 2024 · 1 comment · May be 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 linked a pull request Jun 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant