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

Support tuple assign #605

Closed
jonchoi opened this issue Dec 24, 2017 · 5 comments
Closed

Support tuple assign #605

jonchoi opened this issue Dec 24, 2017 · 5 comments
Labels

Comments

@jonchoi
Copy link

jonchoi commented Dec 24, 2017

image

Can't return (num, num, bytes) without bytes being limited, but can't return bytes < 1024 as part of a tuple.

This is related to the discussion on structs / tuples (#602)

@jonchoi
Copy link
Author

jonchoi commented Dec 24, 2017

Talked with @DavidKnott, this might actually be that Viper doesn't support:

x, y = self.returns_tuple()

What's the suggested pattern for doing something like this?

@DavidKnott
Copy link
Contributor

@jonchoi I think it makes sense to consider adding support for:

x: type
y: type
x, y = self.returns_tuple()

Down the road

@jonchoi
Copy link
Author

jonchoi commented Dec 30, 2017

#545
#596

@jacqueswww
Copy link
Contributor

@jonchoi at the point in time, it was decided to only support returning tuple (to stay compatible with solidity contracts that do the same). +1 for adding support for tuple assignment (I really like it from python hehe).

@jacqueswww jacqueswww changed the title Bytes types in tuple. Support tuple assign Mar 1, 2018
@jacqueswww
Copy link
Contributor

Assignment to tuple is now supported 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants