Skip to content

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

@sbomer

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.

Metadata

Metadata

Assignees

Labels

area-Tools-ILLink.NET linker development as well as trimming analyzers

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions