Skip to content

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

Closed

Description

@sbomer

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.

Activity

  1. added this to the 9.0.0 milestone on Jun 24, 2024
  2. ghost added
    needs-area-label
    on Jun 24, 2024
  3. added
    area-Tools-ILLink
    and removed
    needs-area-label
    on Jun 24, 2024
  4. dotnet-policy-service commented on Jun 24, 2024

    @dotnet-policy-service
    Contributor

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

  5. self-assigned this
    on Jun 24, 2024
  6. locked and limited conversation to collaborators on Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-Tools-ILLink

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions