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

introduce floordiv, ban regular div for integers #2937

Merged
merged 17 commits into from
Feb 21, 2024

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Jun 24, 2022

What I did

implement #2847

(note: wait until after v0.3.4)

How I did it

add FloorDiv node, add typechecker rules

How to verify it

tbd
note:

@external
def foo(x: uint256, y: uint256) -> uint256:
    ret: uint256 = x / y  # banned
    return x // y

@external
def bar(x: decimal, y: decimal) -> decimal:
    ret: decimal = x // y  # banned
    return x / y

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-->

@charles-cooper charles-cooper added this to the v0.4.0 milestone Jun 24, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (29205ba) 84.99% compared to head (1630151) 85.03%.
Report is 8 commits behind head on master.

Files Patch % Lines
vyper/semantics/types/primitives.py 86.20% 3 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2937      +/-   ##
==========================================
+ Coverage   84.99%   85.03%   +0.03%     
==========================================
  Files          92       92              
  Lines       13714    13764      +50     
  Branches     3079     3083       +4     
==========================================
+ Hits        11656    11704      +48     
- Misses       1570     1571       +1     
- Partials      488      489       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@charles-cooper charles-cooper marked this pull request as ready for review February 20, 2024 18:37
@charles-cooper charles-cooper enabled auto-merge (squash) February 21, 2024 00:01
@charles-cooper charles-cooper merged commit 1ca243b into vyperlang:master Feb 21, 2024
84 checks passed
@tserg tserg mentioned this pull request Feb 21, 2024
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