Fix for exception when userdata method call does not exist
This commit is contained in:
parent
e8369bb672
commit
fa967383d6
|
@ -281,9 +281,12 @@ namespace Upsilon.Binder
|
|||
}
|
||||
else if (resolved is UserDataVariableSymbol udSymbol)
|
||||
{
|
||||
if (udSymbol.Parent != null && udSymbol.Parent.Properties[resolved.Name] is UserDataBoundMethod ubMethod)
|
||||
if (udSymbol.Parent != null )
|
||||
{
|
||||
returnType = ubMethod.ResultType;
|
||||
if (udSymbol.Parent.Properties.TryGetValue(resolved.Name, out var ubProperty) && ubProperty is UserDataBoundMethod ubMethod)
|
||||
{
|
||||
returnType = ubMethod.ResultType;
|
||||
}
|
||||
}
|
||||
}
|
||||
return new BoundFunctionCallExpression(expression, parameters.ToImmutable(), e.Span, returnType);
|
||||
|
|
Loading…
Reference in New Issue