Skip to content

Conversation

usagi32
Copy link
Contributor

@usagi32 usagi32 commented Oct 7, 2025

Motivation

I think this was missed at some point in leo when the max number of args for a function were changed in the snarkVM.

Test Plan

Nothing to test

@mohammadfawaz
Copy link
Collaborator

Great catch! Thank you. Would you be willing to improve this error a bit? The error that is currently emitted is from the parser of the produced Aleo code. In contrast, we can catch this problem much earlier, specifically in type checking. Specifically, in this function:

pub fn check_function_signature(&mut self, function: &Function, is_stub: bool) {

We would have to check that the number of inputs for any transition, async transition, function or async function is at most self.limits.max_inputs and also add a corresponding error in https://github.com/ProvableHQ/leo/blob/mainnet/errors/src/errors/type_checker/type_checker_error.rs

@mohammadfawaz mohammadfawaz self-requested a review October 10, 2025 00:18
@mohammadfawaz mohammadfawaz self-assigned this Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants