Skip to content

Commit

Permalink
chore: documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Feb 9, 2024
1 parent 87320df commit 54c9234
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/noirc_frontend/src/hir/type_check/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ impl<'interner> TypeChecker<'interner> {
// Need to setup these flags here as `self` is borrowed mutably to type check the rest of the call expression
// These flags are later used to type check calls to unconstrained functions from constrained functions
let Some(current_func) = self.current_function else {
// If we don't have a value for `current_function` then we are initializing a global.
// We disallow these from being assigned from a function call.
self.errors.push(TypeCheckError::GlobalFunctionCall {
span: self.interner.expr_span(expr_id),
});
Expand Down

0 comments on commit 54c9234

Please sign in to comment.