Skip to content

Commit

Permalink
Explain why the error we produce isn't very informative
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Dec 18, 2024
1 parent 2d6c5a0 commit 989cb6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/noirc_frontend/src/hir/comptime/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ impl<'local, 'interner> Interpreter<'local, 'interner> {
match &global_info.value {
GlobalValue::Resolved(value) => Ok(value.clone()),
GlobalValue::Resolving => {
// Note that the error we issue here isn't very informative (it doesn't include the actual cycle)
// but the general dependency cycle detector will give a better error later on during compilation.
let location = self.elaborator.interner.expr_location(&id);
Err(InterpreterError::GlobalsDependencyCycle { location })
}
Expand Down

0 comments on commit 989cb6a

Please sign in to comment.