You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code should compile successfully since the generic type parameter N is correctly defined in the function signature.
Bug
When trying to compile a function with a generic type parameter, the compiler reports that it cannot find the type parameter N within the scope, even though it should be correctly defined.
error: cannot find `N` in this scope
┌─ array.nr:97:17
│
97 │ for i in 0..N {}
│ - not found in this scope
│
To Reproduce
Installation Method
Compiled from source
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered:
I think the issue is in how we identify/infer numeric type variables currently. They're only added to scope if after checking the function signature we can actually confirm they're numeric by finding them in an array length somewhere.
Aim
Expected Behavior
The code should compile successfully since the generic type parameter N is correctly defined in the function signature.
Bug
When trying to compile a function with a generic type parameter, the compiler reports that it cannot find the type parameter N within the scope, even though it should be correctly defined.
To Reproduce
Installation Method
Compiled from source
Nargo Version
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: