Skip to content

fix: Implement auto-dereferencing when calling methods#2581

Merged
jfecher merged 4 commits intomasterfrom
jf/method-auto-deref
Sep 7, 2023
Merged

fix: Implement auto-dereferencing when calling methods#2581
jfecher merged 4 commits intomasterfrom
jf/method-auto-deref

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.

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
vezenovm
vezenovm previously approved these changes Sep 7, 2023
@jfecher jfecher enabled auto-merge September 7, 2023 17:13
@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
@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