Commit c2da3e6d authored by Acai's avatar Acai
Browse files

Update GeneralExtensions.cs

RegisterOperatorsFunctions support base class
parent 7c178c3d
......@@ -62,8 +62,8 @@ namespace NLua.Extensions
{
public static bool HasMethod (this Type t, string name)
{
var op = t.GetMethods (BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
return op.Any (m => m.Name == name);
var op = t.GetMethods (name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.FlattenHierarchy);
return op != null;
}
public static bool HasAdditionOpertator (this Type t)
......@@ -410,4 +410,4 @@ namespace NLua.Extensions
yield return input.Substring (start);
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment