Handle overloads better

This commit is contained in:
Deukhoofd 2018-12-07 16:51:17 +01:00
parent ac05647d71
commit 99ac02924b
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
2 changed files with 7 additions and 1 deletions

View File

@ -75,6 +75,8 @@ namespace Upsilon.BaseTypes.UserData
{
foreach (var userDataMethodPart in MethodParts)
{
if (userDataMethodPart.Parameters.Length < parameterTypes.Length)
continue;
bool valid = true;
for (var index = 0; index < userDataMethodPart.Parameters.Length; index++)
{

View File

@ -75,7 +75,11 @@ namespace Upsilon.BoundTypes
}
foreach (var f in methods)
{
obj.Properties.Add(f.Name.ToLowerInvariant(), f);
var cleanedName = f.Name.ToLowerInvariant();
// TODO: handle this better, considering overloads
if (obj.Properties.ContainsKey(cleanedName))
continue;
obj.Properties.Add(cleanedName, f);
}
return obj;