Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types of some array functions in the docs are incorrect #4172

Closed
Tracked by #4174
jfecher opened this issue Jan 25, 2024 · 2 comments · Fixed by #4178
Closed
Tracked by #4174

Types of some array functions in the docs are incorrect #4172

jfecher opened this issue Jan 25, 2024 · 2 comments · Fixed by #4178
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jfecher
Copy link
Contributor

jfecher commented Jan 25, 2024

Aim

Looking through the array docs: https://noir-lang.org/docs/noir/syntax/data_types/arrays/#sort

Expected Behavior

Each function to have the correct type

Bug

map, fold, reduce, all, and any are missing their self parameters.

Other functions before them also use a more explicit array: [T; N] over self. This is nice since you can see the object type which you can't with self, but confusing because it makes them look like free functions rather than methods. We should decide on a way to distinguish methods from functions in the docs.

To Reproduce

Installation Method

None

Nargo Version

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@jfecher jfecher added the bug Something isn't working label Jan 25, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 25, 2024
@jfecher jfecher added the documentation Improvements or additions to documentation label Jan 25, 2024
@TomAFrench
Copy link
Member

Probably worth holding off on this and doing as part of the code snippets refactor.

@jfecher
Copy link
Contributor Author

jfecher commented Jan 25, 2024

@TomAFrench My impression was that the code snippets refactor was just related to code snippets compared to this which concerns the pseudo-code of function declarations. The syntax is also correct here, the main issue is some of these functions aren't listing their self parameters.

github-merge-queue bot pushed a commit that referenced this issue Jan 26, 2024
# Description

## Problem\*

Resolves #4172

## Summary\*



## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [x] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants