Skip to content

Commit

Permalink
Update method name
Browse files Browse the repository at this point in the history
  • Loading branch information
buyaa-n committed Mar 15, 2024
1 parent 056f985 commit a28a162
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ internal EntityHandle TryGetMethodHandle(MethodInfo method)
return mb._handle;
}

if (IsConstructedMethodFromNotBakedMethodBuilder(method) ||
if (IsConstructedFromMethodBuilderOrTypeBuilder(method) ||
IsArrayMethodFromNotBakedTypeBuilder(method))
{
return default;
Expand All @@ -964,10 +964,10 @@ internal EntityHandle TryGetMethodHandle(MethodInfo method)
}

private static bool IsArrayMethodFromNotBakedTypeBuilder(MethodInfo method) => method is ArrayMethod arrayMethod &&
arrayMethod.DeclaringType!.GetElementType() is TypeBuilderImpl tb && tb._handle == default;
arrayMethod.DeclaringType!.GetElementType() is TypeBuilderImpl;

private static bool IsConstructedMethodFromNotBakedMethodBuilder(MethodInfo method) => method.IsConstructedGenericMethod &&
(method.GetGenericMethodDefinition() is MethodBuilderImpl mb && mb._handle == default || ContainsTypeBuilder(method.GetGenericArguments()));
private static bool IsConstructedFromMethodBuilderOrTypeBuilder(MethodInfo method) => method.IsConstructedGenericMethod &&
(method.GetGenericMethodDefinition() is MethodBuilderImpl || ContainsTypeBuilder(method.GetGenericArguments()));

internal EntityHandle TryGetMethodHandle(MethodInfo method, Type[] optionalParameterTypes)
{
Expand All @@ -982,7 +982,7 @@ internal EntityHandle TryGetMethodHandle(MethodInfo method, Type[] optionalParam
return mb._handle;
}

if (IsConstructedMethodFromNotBakedMethodBuilder(method))
if (IsConstructedFromMethodBuilderOrTypeBuilder(method))
{
return default;
}
Expand Down

0 comments on commit a28a162

Please sign in to comment.