Skip to content

Commit

Permalink
compiler: fix reference collection for runtime::chanSelect function
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jan 4, 2025
1 parent d15ac0e commit 3e8247e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions std/jule/sema/scope.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1782,6 +1782,15 @@ impl scopeChecker {
}

fn checkSelect(mut &self, mut sc: &ast::Select) {
if self.s.meta.runtime != nil {
// Add reference to runtime::chanSelect function.
mut f := runtimeFindFunc(self.s.meta.runtime, "chanSelect").instance()
mut refers := self.getOwnerRefers()
if refers != nil && !refers.Exist[&FuncIns](f) {
refers.Push(f)
}
}

mut slct := &Select{
Scope: self.scope,
}
Expand Down

0 comments on commit 3e8247e

Please sign in to comment.