Skip to content

Commit

Permalink
Fix function import in analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
MikMuellerDev committed Oct 31, 2022
1 parent 0d18511 commit 699a6a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homescript/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,11 @@ func (self *Analyzer) visitImportStatement(node ImportStmt) (Result, *errors.Err
)
return Result{}, nil
}
functionValue, found := rootScope[actualImport]
functionValue, found := rootScope[node.Function]
if !found {
self.issue(
node.Range,
fmt.Sprintf("no function named '%s' found in module '%s'", actualImport, node.FromModule),
fmt.Sprintf("no function named '%s' found in module '%s'", node.Function, node.FromModule),
errors.ImportError,
)
return Result{}, nil
Expand Down

0 comments on commit 699a6a1

Please sign in to comment.