diff --git a/Upsilon/Binder/Binder.cs b/Upsilon/Binder/Binder.cs index c08a717..898aa7d 100644 --- a/Upsilon/Binder/Binder.cs +++ b/Upsilon/Binder/Binder.cs @@ -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);