Skip to content

Commit 4443731

Browse files
committed
panic if we do not globals memory size
1 parent 6948050 commit 4443731

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/noirc_evaluator/src/brillig/brillig_gen.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ pub(crate) fn gen_brillig_for(
5858
brillig: &Brillig,
5959
) -> Result<GeneratedBrillig<FieldElement>, InternalError> {
6060
// Create the entry point artifact
61-
let globals_memory_size = brillig.globals_memory_size.get(&func.id()).copied().unwrap_or(0);
61+
let globals_memory_size = brillig
62+
.globals_memory_size
63+
.get(&func.id())
64+
.copied()
65+
.expect("Should have the globals memory size specified for an entry point");
6266
let mut entry_point = BrilligContext::new_entry_point_artifact(
6367
arguments,
6468
FunctionContext::return_values(func),

0 commit comments

Comments
 (0)