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

Improve error message when contract calls its own method #4791

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

anton-trunov
Copy link
Contributor

@anton-trunov anton-trunov commented Jul 12, 2023

close #1491

We add ABI methods to the namespace (this is going to be useful for the super-ABI feature) and filter out same contract method calls during method application typechecking, instead of not adding ABI methods to the namespace and providing a bit confusing error message like No method named "method1" found for type "contract".

Description

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@anton-trunov anton-trunov added ABI Everything to do the ABI, especially the JSON representation compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: ui Mostly compiler messages labels Jul 12, 2023
@anton-trunov anton-trunov requested a review from a team July 12, 2023 11:03
@anton-trunov anton-trunov self-assigned this Jul 12, 2023
@IGI-111 IGI-111 requested a review from a team July 13, 2023 15:59
@anton-trunov anton-trunov merged commit 13ed81b into master Jul 13, 2023
@anton-trunov anton-trunov deleted the anton-trunov/contract-calls-its-method branch July 13, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ABI Everything to do the ABI, especially the JSON representation compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: ui Mostly compiler messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve compiler message when you use an ABI method inside the same contract
3 participants