Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,9 @@ private sealed class MakeGenericMethodSite : INodeWithRuntimeDeterminedDependenc
public IEnumerable<DependencyNodeCore<NodeFactory>.DependencyListEntry> InstantiateDependencies(NodeFactory factory, Instantiation typeInstantiation, Instantiation methodInstantiation)
{
var list = new DependencyList();
RootingHelpers.TryGetDependenciesForReflectedMethod(ref list, factory, _method.InstantiateSignature(typeInstantiation, methodInstantiation), "MakeGenericMethod");
MethodDesc instantiatedMethod = _method.InstantiateSignature(typeInstantiation, methodInstantiation);
if (instantiatedMethod.CheckConstraints(new InstantiationContext(typeInstantiation, methodInstantiation)))
RootingHelpers.TryGetDependenciesForReflectedMethod(ref list, factory, instantiatedMethod, "MakeGenericMethod");
return list;
}
}
Expand All @@ -725,7 +727,9 @@ private sealed class MakeGenericTypeSite : INodeWithRuntimeDeterminedDependencie
public IEnumerable<DependencyNodeCore<NodeFactory>.DependencyListEntry> InstantiateDependencies(NodeFactory factory, Instantiation typeInstantiation, Instantiation methodInstantiation)
{
var list = new DependencyList();
RootingHelpers.TryGetDependenciesForReflectedType(ref list, factory, _type.InstantiateSignature(typeInstantiation, methodInstantiation), "MakeGenericType");
TypeDesc instantiatedType = _type.InstantiateSignature(typeInstantiation, methodInstantiation);
if (instantiatedType.CheckConstraints(new InstantiationContext(typeInstantiation, methodInstantiation)))
RootingHelpers.TryGetDependenciesForReflectedType(ref list, factory, instantiatedType, "MakeGenericType");
return list;
}
}
Expand Down
Loading