-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
area-NativeAOT-coreclrpartner-impactThis issue impacts a partner who needs to be kept updatedThis issue impacts a partner who needs to be kept updated
Milestone
Description
Proxy2 is missed.
using System.Runtime.InteropServices;
[assembly: TypeMapAssociation<Program>(typeof(Gen<Atom1>), typeof(Proxy1))]
[assembly: TypeMapAssociation<Program>(typeof(Gen<Atom2>), typeof(Proxy2))]
[assembly: TypeMapAssemblyTarget<Program>("proxymap")]
class Program
{
static void Main()
{
Console.WriteLine(TypeMapping.GetOrCreateProxyTypeMapping<Program>().GetValueOrDefault(new Gen<Atom1>().GetType()));
Console.WriteLine(typeof(Program).GetMethod(nameof(GetProxyGeneric)).MakeGenericMethod(typeof(Atom2)).Invoke(null, []));
}
public static Type GetProxyGeneric<T>() where T : class
{
return TypeMapping.GetOrCreateProxyTypeMapping<Program>().GetValueOrDefault(new Gen<T>().GetType());
}
}
class Gen<T>;
class Atom1;
class Atom2;
class Proxy1;
class Proxy2;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-NativeAOT-coreclrpartner-impactThis issue impacts a partner who needs to be kept updatedThis issue impacts a partner who needs to be kept updated
Type
Projects
Status
No status