Open
Description
openedon Sep 14, 2022
Problem
When you try to save to an account a resource that has a non-storable field, the message you get is mismatched types error: expected 'Storable', got '<Type>'
. This leads to confusion about why the resource cannot be stored.
Steps to Reproduce
Create a resource that has a non-storable field (a reference for instance) and try to save it to an account.
https://github.com/onflow/voting-tutorial/blob/5c7af6e9b499b6b3b4e8216b9df575734e7dcc92/contracts/Voting.cdc#L68
https://github.com/onflow/voting-tutorial/blob/5c7af6e9b499b6b3b4e8216b9df575734e7dcc92/transactions/tx_04_CreateNewBallot.cdc#L21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment