Skip to content

Commit

Permalink
feat: Allow non-comptime field indices in unconstrained functions (#1053
Browse files Browse the repository at this point in the history
)

Allow non-comptime field indices in unconstrained functions
  • Loading branch information
jfecher authored Mar 28, 2023
1 parent 2badf14 commit bc52612
Show file tree
Hide file tree
Showing 4 changed files with 996 additions and 1,002 deletions.
6 changes: 2 additions & 4 deletions crates/noirc_frontend/src/hir/def_collector/dc_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use crate::hir::resolution::{
import::{resolve_imports, ImportDirective},
path_resolver::StandardPathResolver,
};
use crate::hir::type_check::type_check;
use crate::hir::type_check::type_check_func;
use crate::hir::type_check::{type_check_func, TypeChecker};
use crate::hir::Context;
use crate::node_interner::{FuncId, NodeInterner, StmtId, StructId};
use crate::{
Expand Down Expand Up @@ -288,8 +287,7 @@ fn type_check_globals(
all_errors: &mut Vec<FileDiagnostic>,
) {
for (file_id, stmt_id) in global_ids {
let mut errors = vec![];
type_check(interner, &stmt_id, &mut errors);
let errors = TypeChecker::check_global(&stmt_id, interner);
extend_errors(all_errors, file_id, errors);
}
}
Expand Down
Loading

0 comments on commit bc52612

Please sign in to comment.