Skip to content

Commit

Permalink
fix: allow comptime or non comptime fields in unconstrained for loops (
Browse files Browse the repository at this point in the history
…#1172)

Fix unconstrained for loops to allow comptime or non comptime fields
  • Loading branch information
jfecher authored Apr 18, 2023
1 parent 7628ed6 commit 73df465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/noirc_frontend/src/hir/type_check/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl<'interner> TypeChecker<'interner> {

let mut unify_loop_range = |actual_type, span| {
let expected_type = if self.is_unconstrained() {
Type::field(Some(span))
Type::FieldElement(CompTime::new(self.interner))
} else {
Type::comp_time(Some(span))
};
Expand Down

0 comments on commit 73df465

Please sign in to comment.