Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion noir-projects/aztec-nr/aztec/src/macros/dispatch.nr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub comptime fn generate_public_dispatch(m: Module) -> Quoted {
let unit = get_type::<()>();

let ifs = functions.map(|function: FunctionDefinition| {
let name = function.name();
let parameters = function.parameters();
let return_type = function.return_type();

Expand Down Expand Up @@ -56,6 +55,8 @@ pub comptime fn generate_public_dispatch(m: Module) -> Quoted {
}

let args = args.join(quote { , });
// name of the function is assigned just before the call so debug metadata doesn't span most of this macro when figuring out where the call comes from.
let name = function.name();
let call = quote { $name($args) };

let return_code = if return_type == unit {
Expand Down