Skip to content

Commit

Permalink
Update crates/noirc_frontend/src/hir/resolution/resolver.rs
Browse files Browse the repository at this point in the history
Co-authored-by: jfecher <[email protected]>
  • Loading branch information
LHerskind and jfecher authored Jul 6, 2023
1 parent 25dc2e7 commit 42a6cc5
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions crates/noirc_frontend/src/hir/resolution/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,18 +706,15 @@ impl<'a> Resolver<'a> {
}

fn handle_is_function_internal(&mut self, func: &NoirFunction) -> Option<bool> {
if func.def.is_internal {
if self.in_contract() {
Some(true)
} else {
self.push_err(ResolverError::ContractFunctionInternalInNormalFunction {
span: func.name_ident().span(),
});
None
}
} else {
Some(false)
}
if self.in_contract() {
Some(func.def.is_internal)
} else {
if func.def.is_internal {
self.push_err(ResolverError::ContractFunctionInternalInNormalFunction {
span: func.name_ident().span(),
});
None
}
}

fn declare_numeric_generics(&mut self, params: &[Type], return_type: &Type) {
Expand Down

0 comments on commit 42a6cc5

Please sign in to comment.