fix: Fix nested trait dispatch with associated types#8440
Conversation
|
@asterite do you know where the blacklist is for the nargo expand test? |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: cd5dfbc | Previous: f8c6943 | Ratio |
|---|---|---|---|
test_report_noir-lang_noir_bigcurve_ |
275 s |
229 s |
1.20 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
|
It's in build.rs inside nargo_cli. There are many constants for all the tests we ignore. |
|
I've ignored the |
|
I've tested that this fixes the failures in noir-lang/noir_bigcurve#46. Miranda is going to be blocked by this very soon so merging so this ends up in the next nightly. |
|
:huh: |
|
Disabled auto-merge, I'm adding the extra failing test from #8279. The others should be covered by the existing test. |
…/noir-lang/noir into jf/implicit-generics-unification
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: sign extend in signed cast (noir-lang/noir#8264) chore(fuzz): Do not use zero length types in the main input output (noir-lang/noir#8465) chore: fix visibility issues in test suite (noir-lang/noir#8454) chore: blackbox functions for ssa intepreter (noir-lang/noir#8375) feat: improve bitshift codegen (noir-lang/noir#8442) fix(ssa): Mark mutually recursive simple functions (noir-lang/noir#8447) fix: Fix nested trait dispatch with associated types (noir-lang/noir#8440) chore: carry visibilities in monomorphized AST (noir-lang/noir#8439) chore(tests): Add regression for now passing test (noir-lang/noir#8441) chore: use human-readable bytecode in snapshots (noir-lang/noir#8164) chore: bump external pinned commits (noir-lang/noir#8445) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Description
Problem*
Resolves #8252
Summary*
This ended up being a case of doing something almost but not quite right. We were throwing away instantiation bindings during impl search which ends up being fine most of the time when you already have an impl (by using method syntax which looks inside the struct type to find the exact impl method beforehand). If you don't however, you'll only have the instantiation bindings from instantiating your current trait - not the trait impl! So when doing
Eq::eq(a, b)we'd instantiate the object types since Eq requires us instantiate Self, but we don't get the additional type variables on the specific Eq impl which requires the implicit generics from associated types from other traits (in the case of the bugged program at least).I adjusted impl search slightly to return the instantiation bindings of the selected impl as well, and store them if
select_implis true. If we store them withoutselect_implbeing true we can accidentally override other type bindings - I made a note of this in the code.Additional Context
Dobby is a free elf now!
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.