Skip to content

chore(elaborator): Infer type of lambdas in tuple args; more docs#10405

Merged
aakoshh merged 22 commits intomasterfrom
af/elaborator
Nov 7, 2025
Merged

chore(elaborator): Infer type of lambdas in tuple args; more docs#10405
aakoshh merged 22 commits intomasterfrom
af/elaborator

Conversation

@aakoshh
Copy link
Contributor

@aakoshh aakoshh commented Nov 6, 2025

Description

Problem*

A bit of summary of what a method does helps to remind myself what I'm looking at.

Summary*

  • Makes push_errors more generic to avoid having to add in a loop.
  • Adds docstrings to methods.
  • Uses the type of function call arguments to elaborate any argument expression, instead of only doing it for lambdas. Added test to show that passing a tuple of lambdas prevented type inference before.
  • Added test to show that we cannot pattern match a structure with non-visible fields. Created a ticket to make it possible: Support .. in patterns #10419
  • Fixes contains_slice to handle arrays with nested slices as well. Added test to show that it accepted a multi dimensional array with a nested slice deeper than the first level item.
  • Removed add_global_variable_decl, since globals are not supposed to be added to the scope according to the comments
  • Added some extra assertions.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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: 941f31e Previous: 1739efd Ratio
test_report_zkpassport_noir-ecdsa_ 3 s 1 s 3

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 590c0be Previous: 9336ae6 Ratio
rollup-block-root-single-tx 0.003 s 0.002 s 1.50
sha512-100-bytes 0.076 s 0.059 s 1.29

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

@aakoshh aakoshh changed the title chore(elaborator): Add docstrings chore(elaborator): More lambda inference; more docs Nov 7, 2025
@aakoshh aakoshh changed the title chore(elaborator): More lambda inference; more docs chore(elaborator): Infer type of lambdas in tuple args; more docs Nov 7, 2025
@aakoshh aakoshh marked this pull request as ready for review November 7, 2025 14:23
@aakoshh aakoshh requested a review from a team November 7, 2025 14:28
@aakoshh aakoshh added this to the Group 7 Audited milestone Nov 7, 2025
Copy link
Collaborator

@asterite asterite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@aakoshh aakoshh enabled auto-merge November 7, 2025 17:14
@aakoshh aakoshh added this pull request to the merge queue Nov 7, 2025
Merged via the queue into master with commit 89c2b2d Nov 7, 2025
137 of 138 checks passed
@aakoshh aakoshh deleted the af/elaborator branch November 7, 2025 19:23
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Nov 10, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore(elaborator): Infer type of lambdas in tuple args; more docs (noir-lang/noir#10405)
fix: revert "feat(ACIR): reuse element_type_sizes blocks with the same str… (noir-lang/noir#10428)
chore(frontend): Avoid silent fallback when returning turbofish generics for primitive types (noir-lang/noir#10416)
fix: mark ECDSA verification as `PureWithPredicate` (noir-lang/noir#10423)
fix(parser): don't crash on incomplete type alias (noir-lang/noir#10421)
chore(github): Refine pull request template wording (noir-lang/noir#10418)
chore: refactor codegen_memory (noir-lang/noir#10323)
chore(frontend): Primitive types generic count unit tests (noir-lang/noir#10412)
chore: use SignedField::from_signed in enums.rs (noir-lang/noir#10408)
chore: use `map_data_bus_in_place` in mem2reg (noir-lang/noir#10407)
chore: apply typo fixes from Cantina (noir-lang/noir#10406)
chore(frontend): Various comptime blocks unit tests (noir-lang/noir#10398)
fix: clarify predicate comment in BrilligCall and Call opcodes (noir-lang/noir#10356)
END_COMMIT_OVERRIDE
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Nov 10, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore(elaborator): Infer type of lambdas in tuple args; more docs
(noir-lang/noir#10405)
fix: revert "feat(ACIR): reuse element_type_sizes blocks with the same
str… (noir-lang/noir#10428)
chore(frontend): Avoid silent fallback when returning turbofish generics
for primitive types (noir-lang/noir#10416)
fix: mark ECDSA verification as `PureWithPredicate`
(noir-lang/noir#10423)
fix(parser): don't crash on incomplete type alias
(noir-lang/noir#10421)
chore(github): Refine pull request template wording
(noir-lang/noir#10418)
chore: refactor codegen_memory
(noir-lang/noir#10323)
chore(frontend): Primitive types generic count unit tests
(noir-lang/noir#10412)
chore: use SignedField::from_signed in enums.rs
(noir-lang/noir#10408)
chore: use `map_data_bus_in_place` in mem2reg
(noir-lang/noir#10407)
chore: apply typo fixes from Cantina
(noir-lang/noir#10406)
chore(frontend): Various comptime blocks unit tests
(noir-lang/noir#10398)
fix: clarify predicate comment in BrilligCall and Call opcodes
(noir-lang/noir#10356)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants