Skip to content

Commit

Permalink
fix(Weaver): fixing generic check on extension methods
Browse files Browse the repository at this point in the history
generic extension methods should be ignored by weaver.

fixes: #1066
  • Loading branch information
James-Frowen committed Jul 16, 2022
1 parent 2ef3cd6 commit fddf9ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirage/Weaver/Processors/ReaderWriterProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public void RegisterExtensionMethodsInType(TypeDefinition type)
private static bool IsExtension(MethodInfo method) => Attribute.IsDefined(method, typeof(ExtensionAttribute));
private static bool IsExtension(MethodDefinition method) => method.HasCustomAttribute<ExtensionAttribute>();
private static bool NotGeneric(MethodInfo method) => !method.IsGenericMethod;
private static bool NotGeneric(MethodDefinition method) => !method.IsGenericInstance;
private static bool NotGeneric(MethodDefinition method) => !method.IsGenericInstance && !method.HasGenericParameters;

/// <returns>true if method does not have <see cref="WeaverIgnoreAttribute"/></returns>
private static bool NotIgnored(MethodInfo method) => !Attribute.IsDefined(method, typeof(WeaverIgnoreAttribute));
Expand Down

0 comments on commit fddf9ea

Please sign in to comment.