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)
|
||||
: base(new TypeContainer(name), typeof(void))
|
||||
: base(new TypeContainer(name), new System.Type[0])
|
||||
{
|
||||
Name = name;
|
||||
Properties = backingType;
|
||||
|
@ -216,11 +216,18 @@ namespace Upsilon.BoundTypes
|
|||
{
|
||||
var parent =
|
||||
(UserDataBoundTypeDefinition) ((UserDataVariableSymbol) variable).BoundTypeDefinition;
|
||||
if (parent.ValidInternalTypes.Length != 0)
|
||||
{
|
||||
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