Fix binding functions when no access to direct types
This commit is contained in:
parent
30c3223cb4
commit
97f3a4d879
|
@ -23,7 +23,7 @@ namespace Upsilon.BoundTypes
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserDataBoundTypeDefinition(string name, Dictionary<string, UserDataBoundProperty> backingType)
|
public UserDataBoundTypeDefinition(string name, Dictionary<string, UserDataBoundProperty> backingType)
|
||||||
: base(new TypeContainer(name), typeof(void))
|
: base(new TypeContainer(name), new System.Type[0])
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
Properties = backingType;
|
Properties = backingType;
|
||||||
|
@ -216,10 +216,17 @@ namespace Upsilon.BoundTypes
|
||||||
{
|
{
|
||||||
var parent =
|
var parent =
|
||||||
(UserDataBoundTypeDefinition) ((UserDataVariableSymbol) variable).BoundTypeDefinition;
|
(UserDataBoundTypeDefinition) ((UserDataVariableSymbol) variable).BoundTypeDefinition;
|
||||||
if (functionParameter.ActualType != null &&
|
if (parent.ValidInternalTypes.Length != 0)
|
||||||
!parent.ValidInternalTypes.Any(x => string.Equals(x.Name, functionParameter.ActualType)))
|
|
||||||
{
|
{
|
||||||
return false;
|
if (functionParameter.ActualType != null &&
|
||||||
|
!parent.ValidInternalTypes.Any(x => string.Equals(x.Name, functionParameter.ActualType)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!string.Equals(parent.Name, functionParameter.ActualType, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue