-
Notifications
You must be signed in to change notification settings - Fork 219
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
Trait method not found when working on inferred integer type #3051
Comments
5 tasks
TomAFrench
added a commit
that referenced
this issue
Apr 16, 2024
5 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Apr 26, 2024
# Description ## Problem\* Resolves #3051 ## Summary\* This issue has been fixed and so I'm added a regression test. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** 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.
TomAFrench
added a commit
that referenced
this issue
May 1, 2024
* master: (25 commits) feat: Complex outputs from acir call (#4952) fix: Require for all foldable functions to use distinct return (#4949) feat!: use `distinct` return value witnesses by default (#4951) chore(docs): adding matomo tracking (#4898) chore: fix typo in `ResolverError::AbiAttributeOutsideContract` (#4933) chore: Add test for recursing a foldable function (#4948) feat: Handle `no_predicates` attribute (#4942) fix: ensure where clauses propagated to trait default definitions (#4894) chore: Remove unnecessary `pub(super)` in interpreter (#4939) feat: add de-sugaring for `impl Trait` in function parameters (#4919) feat(experimental): `comptime` globals (#4918) chore: update error conversion traits to act on references (#4936) fix: ban self-referential structs (#4883) chore: add regression test for #3051 (#4815) fix: discard ref counts during unrolling (#4923) feat!: Bit shift is restricted to u8 right operand (#4907) feat: Add `#[inline(tag)]` attribute and codegen (#4913) chore: rework workspace structure for utils crates (#4886) feat: add variable size sha256 (#4920) chore: delete flake.lock (#4855) ...
TomAFrench
added a commit
that referenced
this issue
May 1, 2024
* master: (25 commits) feat: Complex outputs from acir call (#4952) fix: Require for all foldable functions to use distinct return (#4949) feat!: use `distinct` return value witnesses by default (#4951) chore(docs): adding matomo tracking (#4898) chore: fix typo in `ResolverError::AbiAttributeOutsideContract` (#4933) chore: Add test for recursing a foldable function (#4948) feat: Handle `no_predicates` attribute (#4942) fix: ensure where clauses propagated to trait default definitions (#4894) chore: Remove unnecessary `pub(super)` in interpreter (#4939) feat: add de-sugaring for `impl Trait` in function parameters (#4919) feat(experimental): `comptime` globals (#4918) chore: update error conversion traits to act on references (#4936) fix: ban self-referential structs (#4883) chore: add regression test for #3051 (#4815) fix: discard ref counts during unrolling (#4923) feat!: Bit shift is restricted to u8 right operand (#4907) feat: Add `#[inline(tag)]` attribute and codegen (#4913) chore: rework workspace structure for utils crates (#4886) feat: add variable size sha256 (#4920) chore: delete flake.lock (#4855) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aim
Expected Behavior
The given code should compile and run
Bug
An error is issued:
We should match rust's behavior here. At the time
1.foo()
is called, there is only 1 applicable impl, so we should select that one and set the type of1
appropriately.The likely reason this doesn't already work is that integer literals in noir are polymorphic (generic), and the use of generics with traits isn't yet implemented.
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
The text was updated successfully, but these errors were encountered: