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

Make storage assignments for structs work #235

Closed
cburgdorf opened this issue Feb 5, 2021 · 1 comment
Closed

Make storage assignments for structs work #235

cburgdorf opened this issue Feb 5, 2021 · 1 comment

Comments

@cburgdorf
Copy link
Collaborator

What is wrong?

When #203 lands, we'll have basic support for structs.

struct House:
    price: u256
    size: u256
    vacant: bool

contract City:

    pub def get_price() -> u256:
        building: House = House(300, 500, true)

        assert building.size == 500
        assert building.price == 300
        assert building.vacant

        return building.price

However, what's not working yet is assigning a struct to storage like self.house = House(300, 500, true)

How can it be fixed

I haven't looked into it yet.

@cburgdorf
Copy link
Collaborator Author

This landed already

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

No branches or pull requests

1 participant