Skip to content

Commit

Permalink
Use new flag to set function unconstrained
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Dec 20, 2024
1 parent 08732ed commit 094a831
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/noirc_frontend/src/monomorphization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ impl<'interner> Monomorphizer<'interner> {
assert_eq!(new_main_id, Program::main_id());

let location = self.interner.function_meta(&main_id).location;
self.in_unconstrained_function = self.is_unconstrained(main_id);
self.function(main_id, new_main_id, location)?;

self.return_location =
Expand Down Expand Up @@ -352,7 +353,7 @@ impl<'interner> Monomorphizer<'interner> {
};

let return_type = Self::convert_type(return_type, meta.location)?;
let unconstrained = modifiers.is_unconstrained;
let unconstrained = self.in_unconstrained_function;

let attributes = self.interner.function_attributes(&f);
let inline_type = InlineType::from(attributes);
Expand Down

0 comments on commit 094a831

Please sign in to comment.