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: raw_call type when max_outsize=0 is set #3572

Merged

Conversation

charles-cooper
Copy link
Member

prior to this commit, when raw_call is used with max_outsize explicitly set to 0 (max_outsize=0) the compiler incorrectly infers that raw_call has no return type

@external
@payable
def foo(_target: address):
    # compiles
    a: bool = raw_call(_target, method_id("foo()"), revert_on_failure=False)
    # should have same behavior, but prior to this commit does not compile:
    b: bool = raw_call(_target, method_id("foo()"), max_outsize=0, revert_on_failure=False)

chainsec june 2023 review 5.16

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

prior to this commit, when `raw_call` is used with `max_outsize`
explicitly set to 0 (`max_outsize=0`) the compiler incorrectly infers that
raw_call has no return type

```vyper
@external
@payable
def foo(_target: address):
    # compiles
    a: bool = raw_call(_target, method_id("foo()"), revert_on_failure=False)
    # should have same behavior, but prior to this commit does not compile:
    b: bool = raw_call(_target, method_id("foo()"), max_outsize=0, revert_on_failure=False)
```

chainsec june 2023 review 5.16
@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2023

Codecov Report

Merging #3572 (0336745) into master (43c8d85) will decrease coverage by 0.07%.
Report is 9 commits behind head on master.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3572      +/-   ##
==========================================
- Coverage   89.13%   89.06%   -0.07%     
==========================================
  Files          85       85              
  Lines       11365    11369       +4     
  Branches     2585     2584       -1     
==========================================
- Hits        10130    10126       -4     
- Misses        813      820       +7     
- Partials      422      423       +1     
Files Changed Coverage Δ
vyper/builtins/functions.py 90.46% <100.00%> (+0.07%) ⬆️

... and 7 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@charles-cooper charles-cooper enabled auto-merge (squash) September 1, 2023 17:16
@charles-cooper charles-cooper merged commit 572b38c into vyperlang:master Sep 1, 2023
76 of 77 checks passed
@charles-cooper charles-cooper deleted the fix/raw-call-return-type branch September 1, 2023 17:42
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.

4 participants