Skip to content

Commit

Permalink
Allow guessing canonical owning type instantiations (#71120)
Browse files Browse the repository at this point in the history
This essentially undoes dotnet/runtimelab#958. I think the underlying problem no longer exists because we now run generic virtual method analysis on top of canonical bodies.
  • Loading branch information
MichalStrehovsky authored Jun 22, 2022
1 parent 202f0af commit fc813dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static bool TryGetDependenciesForReflectedMethod(ref DependencyList depen
if (method.OwningType.IsGenericDefinition || method.OwningType.ContainsSignatureVariables(treatGenericParameterLikeSignatureVariable: true))
{
TypeDesc owningType = method.OwningType.GetTypeDefinition();
Instantiation inst = TypeExtensions.GetInstantiationThatMeetsConstraints(owningType.Instantiation, allowCanon: false);
Instantiation inst = TypeExtensions.GetInstantiationThatMeetsConstraints(owningType.Instantiation, allowCanon: !method.HasInstantiation);
if (inst.IsNull)
{
return false;
Expand Down

0 comments on commit fc813dd

Please sign in to comment.