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
Successfully add doc comments on the function itself.
When adding doc comments on parameters I expect an error similar to the one we see in Rust:
Bug
Adding doc comments on the parameter gives warnings over the entire doc comment:
Putting the doc comments on the function itself but after the attribute causes the first line of the doc comments to trigger with a warning and the return value errors with expected bool, found type ()
Doc comments work when placed before the attribute:
However, we should be able to place doc comments before or after the attribute. Doc comments work as expected on functions without attributes as well.
To Reproduce
Try to add doc comments to any noir function parameters or a function with attributes
Workaround
Yes
Workaround Description
Regular comments that use //
Additional Context
No response
Project Impact
Blocker
Blocker Context
Cannot place doc comments on function parameters
Nargo Version
nargo version = 1.0.0-beta.3 noirc version = 1.0.0-beta.3+5e2b9e9f1a8ac639acdb204be291739fa50f2ff5 (git version hash: 5e2b9e9, is dirty: true)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered:
Aim
I want to add doc comments to our foreign functions in the stdlib. This is what an example signature looks like now:
I want to be able to add doc comments on a parameter such as:
Or on the function itself:
Expected Behavior
Successfully add doc comments on the function itself.
When adding doc comments on parameters I expect an error similar to the one we see in Rust:

Bug
Adding doc comments on the parameter gives warnings over the entire doc comment:

Putting the doc comments on the function itself but after the attribute causes the first line of the doc comments to trigger with a warning and the return value errors with

expected bool, found type ()
Doc comments work when placed before the attribute:

However, we should be able to place doc comments before or after the attribute. Doc comments work as expected on functions without attributes as well.
To Reproduce
Workaround
Yes
Workaround Description
Regular comments that use
//
Additional Context
No response
Project Impact
Blocker
Blocker Context
Cannot place doc comments on function parameters
Nargo Version
nargo version = 1.0.0-beta.3 noirc version = 1.0.0-beta.3+5e2b9e9f1a8ac639acdb204be291739fa50f2ff5 (git version hash: 5e2b9e9, is dirty: true)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: