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

fix: issue duplicate error on impl function without self #7490

Merged
merged 8 commits into from
Feb 24, 2025

Conversation

asterite
Copy link
Collaborator

@asterite asterite commented Feb 21, 2025

Description

Problem

Resolves #7483

Summary

The first commit has the fix. The second one is a refactor.

It turned out the first commit fixed the bug but introduced another one. So there's a third (fourth, after merge) commit that fixes both. The idea is to always store the type methods are added to and later check this type against the type a method is being added to.

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.

@asterite asterite requested review from a team and removed request for a team February 21, 2025 21:32
@asterite asterite requested a review from a team February 24, 2025 14:06
asterite and others added 3 commits February 24, 2025 14:22
* master:
  feat(experimental): Support struct constructors in match patterns (#7489)
  feat: use resolved type instead of needing Constructor.struct_type (#7500)
  feat: better error message when keyword is found instead of type in p… (#7501)
  chore: bump external pinned commits (#7497)
  feat(experimental): Add invalid pattern syntax error (#7487)
  fix(performance): Accurately mark safe constant indices for arrays of complex types (#7491)
@TomAFrench TomAFrench enabled auto-merge February 24, 2025 17:55
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: 5916a13 Previous: 6f79fd1 Ratio
rollup-merge 0.008 s 0.006 s 1.33

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

CC: @TomAFrench

@TomAFrench
Copy link
Member

@asterite I've pushed a commit which reverts the change to check_self_arg as tests are passing for me with that on.

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: 1c43fd1 Previous: 6f79fd1 Ratio
AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 66 s 54 s 1.22

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

CC: @TomAFrench

@TomAFrench
Copy link
Member

huh.

@TomAFrench
Copy link
Member

Weirdly, this was passing locally so not sure what's up.

@TomAFrench TomAFrench added this pull request to the merge queue Feb 24, 2025
Merged via the queue into master with commit 69e901f Feb 24, 2025
101 of 102 checks passed
@TomAFrench TomAFrench deleted the ab/no-duplicate-error branch February 24, 2025 18:52
TomAFrench added a commit that referenced this pull request Feb 25, 2025
* master: (74 commits)
  feat: optimize out range checks on limiting cases (#7510)
  chore: clippy fixes (#7505)
  chore(docs): Supplement docs on `modexp` as a required precompile for Barretenberg's Solidity verifier (#7508)
  feat(debugger): REPL add breakpoint by sourcecode line (#5204)
  fix: issue duplicate error on impl function without self (#7490)
  feat(experimental): Support struct constructors in match patterns (#7489)
  feat: use resolved type instead of needing Constructor.struct_type (#7500)
  feat: better error message when keyword is found instead of type in p… (#7501)
  chore: bump external pinned commits (#7497)
  feat(experimental): Add invalid pattern syntax error (#7487)
  fix(performance): Accurately mark safe constant indices for arrays of complex types (#7491)
  fix(experimental): Allow shadowing in match patterns (#7484)
  chore: regression test #7195 (#7233)
  chore(docs): Section on `noir-profiler execution-opcodes` (#7480)
  chore: improve proptesting of 128bit values in `noirc_abi` (#7485)
  chore(profiler): Use brillig names for outputted flamegraphs  (#7470)
  chore(docs): Profiler images reference (#7481)
  fix: don't use dummy location when inserting debug code (#7482)
  feat(cli)!: Add `--unstable-features` to gate unstable features (#7449)
  feat: Sync from aztec-packages (#7474)
  ...
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Feb 26, 2025
feat: let all compiler errors carry a Location instead of a Span (noir-lang/noir#7486)
chore: Increaes base64's allotted time (noir-lang/noir#7521)
fix: don't crash on broken impl syntax (noir-lang/noir#7512)
feat: optimize out range checks on limiting cases (noir-lang/noir#7510)
chore: clippy fixes (noir-lang/noir#7505)
chore(docs): Supplement docs on `modexp` as a required precompile for Barretenberg's Solidity verifier (noir-lang/noir#7508)
feat(debugger): REPL add breakpoint by sourcecode line (noir-lang/noir#5204)
fix: issue duplicate error on impl function without self (noir-lang/noir#7490)
feat(experimental): Support struct constructors in match patterns (noir-lang/noir#7489)
feat: use resolved type instead of needing Constructor.struct_type (noir-lang/noir#7500)
feat: better error message when keyword is found instead of type in p… (noir-lang/noir#7501)
chore: bump external pinned commits (noir-lang/noir#7497)
feat(experimental): Add invalid pattern syntax error (noir-lang/noir#7487)
fix(performance): Accurately mark safe constant indices for arrays of complex types (noir-lang/noir#7491)
fix(experimental): Allow shadowing in match patterns (noir-lang/noir#7484)
chore: regression test #7195 (noir-lang/noir#7233)
chore(docs): Section on `noir-profiler execution-opcodes` (noir-lang/noir#7480)
chore: improve proptesting of 128bit values in `noirc_abi` (noir-lang/noir#7485)
chore(profiler): Use brillig names for outputted flamegraphs  (noir-lang/noir#7470)
chore(docs): Profiler images reference (noir-lang/noir#7481)
fix: don't use dummy location when inserting debug code (noir-lang/noir#7482)
feat(cli)!: Add `--unstable-features` to gate unstable features (noir-lang/noir#7449)
TomAFrench pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Feb 26, 2025
Automated pull of development from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: bump external pinned commits
(noir-lang/noir#7515)
feat: let all compiler errors carry a Location instead of a Span
(noir-lang/noir#7486)
chore: Increaes base64's allotted time
(noir-lang/noir#7521)
fix: don't crash on broken impl syntax
(noir-lang/noir#7512)
feat: optimize out range checks on limiting cases
(noir-lang/noir#7510)
chore: clippy fixes (noir-lang/noir#7505)
chore(docs): Supplement docs on `modexp` as a required precompile for
Barretenberg's Solidity verifier
(noir-lang/noir#7508)
feat(debugger): REPL add breakpoint by sourcecode line
(noir-lang/noir#5204)
fix: issue duplicate error on impl function without self
(noir-lang/noir#7490)
feat(experimental): Support struct constructors in match patterns
(noir-lang/noir#7489)
feat: use resolved type instead of needing Constructor.struct_type
(noir-lang/noir#7500)
feat: better error message when keyword is found instead of type in p…
(noir-lang/noir#7501)
chore: bump external pinned commits
(noir-lang/noir#7497)
feat(experimental): Add invalid pattern syntax error
(noir-lang/noir#7487)
fix(performance): Accurately mark safe constant indices for arrays of
complex types (noir-lang/noir#7491)
fix(experimental): Allow shadowing in match patterns
(noir-lang/noir#7484)
chore: regression test #7195
(noir-lang/noir#7233)
chore(docs): Section on `noir-profiler execution-opcodes`
(noir-lang/noir#7480)
chore: improve proptesting of 128bit values in `noirc_abi`
(noir-lang/noir#7485)
chore(profiler): Use brillig names for outputted flamegraphs
(noir-lang/noir#7470)
chore(docs): Profiler images reference
(noir-lang/noir#7481)
fix: don't use dummy location when inserting debug code
(noir-lang/noir#7482)
feat(cli)!: Add `--unstable-features` to gate unstable features
(noir-lang/noir#7449)
END_COMMIT_OVERRIDE

---------

Co-authored-by: guipublic <[email protected]>
Co-authored-by: guipublic <[email protected]>
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.

No duplicate error on impl function without self
2 participants