Fixed crash in analyzer that caused #31

This commit is contained in:
Sasha Koshka 2024-02-10 21:16:22 -05:00
parent 4425823404
commit 6aa75b80c5

View File

@ -131,11 +131,10 @@ func (this *Tree) analyzeMethodCall (
error,
) {
// get method
sourceExpr, err := this.analyzeExpression(nil, strict, call.Source)
source := sourceExpr.(*entity.Variable)
source, err := this.analyzeExpression(nil, strict, call.Source)
if err != nil { return nil, err }
method, err := this.analyzeMethodOrBehavior (
call.Position, source.Declaration.Type(), call.Name)
call.Position, source.Type(), call.Name)
if err != nil { return nil, err }
// extract signature