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 bytes20 literals #2782

Merged
merged 14 commits into from
Apr 14, 2022

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Apr 13, 2022

What I did

fix #2780

also fix #2790 by blocking underscores in hex literals.

How I did it

propagate more type info down into codegen. note the bandaid in expr.py due to type annotations sometimes missing.

How to verify it

see tests

Commit message

Description for the changelog

Cute Animal Picture

image

@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2022

Codecov Report

Merging #2782 (0cb1121) into master (fbed83c) will decrease coverage by 0.24%.
The diff coverage is 91.17%.

@@            Coverage Diff             @@
##           master    #2782      +/-   ##
==========================================
- Coverage   87.43%   87.18%   -0.25%     
==========================================
  Files          93       93              
  Lines        9939     9956      +17     
  Branches     2465     2424      -41     
==========================================
- Hits         8690     8680      -10     
- Misses        783      800      +17     
- Partials      466      476      +10     
Impacted Files Coverage Δ
vyper/codegen/expr.py 80.73% <75.00%> (-0.33%) ⬇️
vyper/ast/nodes.py 94.20% <100.00%> (ø)
vyper/semantics/types/value/address.py 100.00% <100.00%> (+6.89%) ⬆️
vyper/semantics/types/value/bytes_fixed.py 100.00% <100.00%> (ø)
vyper/semantics/validation/annotation.py 92.15% <100.00%> (+0.21%) ⬆️
vyper/utils.py 87.27% <100.00%> (+0.15%) ⬆️
vyper/builtin_functions/convert.py 82.88% <0.00%> (-7.61%) ⬇️
vyper/ast/validation.py 68.88% <0.00%> (-4.45%) ⬇️
vyper/ir/s_expressions.py 91.17% <0.00%> (-2.95%) ⬇️
vyper/cli/vyper_json.py 79.42% <0.00%> (-0.37%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbed83c...0cb1121. Read the comment docs.

@charles-cooper charles-cooper marked this pull request as ready for review April 14, 2022 16:44
@charles-cooper charles-cooper merged commit 5359c6f into vyperlang:master Apr 14, 2022
@charles-cooper charles-cooper deleted the fix_bytes20_literals branch April 14, 2022 20:09
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.

Underscores in hexadecimal literals bytes20 literals produce wrong bytecode
3 participants