feat[lang]: enable bitwise ops for bytesM types#4538
feat[lang]: enable bitwise ops for bytesM types#4538charles-cooper merged 16 commits intovyperlang:masterfrom
bytesM types#4538Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4538 +/- ##
==========================================
- Coverage 92.57% 92.55% -0.02%
==========================================
Files 123 123
Lines 17456 17468 +12
Branches 2946 2951 +5
==========================================
+ Hits 16160 16168 +8
- Misses 894 896 +2
- Partials 402 404 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
def test_bytes_unary(get_contract):
src = """
def foo() -> bytes32:
return ~0x0000000000000000000000000000000000000000000000000000000000000000
"""
c = get_contract(src)
vyper_ast = parse_and_fold(f"~0x0000000000000000000000000000000000000000000000000000000000000000")
old_node = vyper_ast.body[0].value
new_node = old_node.get_folded_value()call to |
|
i think it would be cleaner to disallow stuff like ~ for < 32 bytesm in semantics |
|
https://github.com/charles-cooper/vyper/pull/67/files adds a roundtrip test which fails on vyper grammar, we should raise an issue |
…ise-bytes add roundtrip not test
created the issue: #4564 |
we may add those later. so to keep "locality" (the exception thrown near where it will be fixed), let's leave it as is. |
bytesM types
What I did
implement #4305
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture