@ -201,6 +201,9 @@ namespace CppSharp.AST
public override IEnumerable<Function> GetOverloads(Function function)
{
if (function.IsOperator)
return Methods.Where(fn => fn.OperatorKind == function.OperatorKind);
var methods = Methods.Where(m => m.Name == function.Name);
if (methods.ToList().Count != 0)
return methods;
@ -323,4 +323,13 @@ namespace SomeNamespace
public:
virtual void AbstractMethod() = 0;
};
}
// Test operator overloads
class ClassWithOverloadedOperators
operator char();
operator int();
operator short();