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: Implement auto-dereferencing when calling methods #2581

Merged
merged 4 commits into from
Sep 7, 2023

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Sep 6, 2023

Description

Problem*

Resolves #2560

Summary*

We had auto-dereferencing before for field access a.b, but since method calls a.b() are a different form, these were missed. I've added support for these and a small test for them.

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

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

vezenovm
vezenovm previously approved these changes Sep 7, 2023
crates/noirc_frontend/src/hir/type_check/expr.rs Outdated Show resolved Hide resolved
@jfecher jfecher added this pull request to the merge queue Sep 7, 2023
Merged via the queue into master with commit 3c731b1 Sep 7, 2023
13 checks passed
@jfecher jfecher deleted the jf/method-auto-deref branch September 7, 2023 17:47
TomAFrench added a commit that referenced this pull request Sep 7, 2023
* master:
  chore: remove usage of `serial_test` dependency (#2598)
  fix: Implement auto-dereferencing when calling methods (#2581)
  chore(noir): Release 0.11.1 (#2594)
TomAFrench added a commit that referenced this pull request Sep 7, 2023
* master:
  fix(ssa): Slice mergers with multiple ifs (#2597)
  chore: remove usage of `serial_test` dependency (#2598)
  fix: Implement auto-dereferencing when calling methods (#2581)
  chore(noir): Release 0.11.1 (#2594)
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.

error: Expected type Vec<_>, found type &mut Vec<Field> when calling Vec::len on a &mut Vec
3 participants