From b08b6b1d85dcb93571cf989221204b898ab14017 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Mon, 16 Oct 2023 23:53:31 +0100 Subject: [PATCH] chore: Fix aztec branch (#3185) --- compiler/noirc_frontend/src/hir/aztec_library.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/noirc_frontend/src/hir/aztec_library.rs b/compiler/noirc_frontend/src/hir/aztec_library.rs index 2d91840544c..2b3fdc9b05e 100644 --- a/compiler/noirc_frontend/src/hir/aztec_library.rs +++ b/compiler/noirc_frontend/src/hir/aztec_library.rs @@ -342,8 +342,10 @@ fn collect_crate_structs(crate_id: &CrateId, context: &Context) -> Vec /// Substitutes the signature literal that was introduced in the selector method previously with the actual signature. fn transform_event(struct_id: StructId, interner: &mut NodeInterner) { - let selector_id = - interner.lookup_method(struct_id, "selector").expect("Selector method not found"); + let struct_type = interner.get_struct(struct_id); + let selector_id = interner + .lookup_method(&Type::Struct(struct_type, vec![]), struct_id, "selector", true) + .expect("Selector method not found"); let selector_function = interner.function(&selector_id); let compute_selector_statement = interner.statement(