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

Operator overloading for Concat and Bytes #563

Closed
PabloLION opened this issue Oct 14, 2022 · 2 comments
Closed

Operator overloading for Concat and Bytes #563

PabloLION opened this issue Oct 14, 2022 · 2 comments
Labels
new-feature-request Feature request that needs triage

Comments

@PabloLION
Copy link
Contributor

Problem

Bytes('a') + Bytes('b') will report type check error because of this: https://github.com/algorand/pyteal/blob/master/pyteal/ast/expr.py#L72-L73

def __add__(self, other):
from pyteal.ast.naryexpr import Add

Solution

Bytes('a') + Bytes('b') returns Concat(Bytes('a'),Bytes('b')), or Bytes('ab')

Dependencies

Urgency

Ergonomic feature, not urgent.

@PabloLION PabloLION added the new-feature-request Feature request that needs triage label Oct 14, 2022
@barnjamin
Copy link
Contributor

dupe of #496

@PabloLION
Copy link
Contributor Author

Sorry @barnjamin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature-request Feature request that needs triage
Projects
None yet
Development

No branches or pull requests

2 participants