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

bug: unable to create Array of class type #113

Open
laciferin2024 opened this issue May 26, 2024 · 0 comments
Open

bug: unable to create Array of class type #113

laciferin2024 opened this issue May 26, 2024 · 0 comments

Comments

@laciferin2024
Copy link

@dataclass
class Guess:
    keys_owned: u8
    address: str
class Room(Account):
    id: u64
    owner: Pubkey
    cur_price: u64
    is_locked: bool
    guests: List[Guest]
/bin/zsh -c "just build"
seahorse build 
✗ Compiling rizz...
Error: anchor build -p rizz failed:

This is most likely a bug in the Seahorse compiler!

If you want to help the project, you can report this:
  - on the Seahorse Discord (http://discord.gg/4sFzH5pus8)
  - or as a Github issue (https://github.com/ameliatastic/seahorse-lang/issues).

Thanks!

warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /Volumes/N/Reclaim/Rizz/programs/rizz/Cargo.toml
workspace: /Volumes/N/Reclaim/Rizz/Cargo.toml
   Compiling rizz v0.1.0 (/Volumes/N/Reclaim/Rizz/programs/rizz)
error[E0277]: the trait bound `seahorse_util::Mutable<Guest>: BorshSerialize` is not satisfied
  --> programs/rizz/src/dot/program.rs:38:1
   |
38 | #[account]
   | ^^^^^^^^^^ the trait `BorshSerialize` is not implemented for `seahorse_util::Mutable<Guest>`
   |
   = help: the following other types implement trait `BorshSerialize`:
             &T
             ()
             (T0, T1)
             (T0, T1, T2)
             (T0, T1, T2, T3)
             (T0, T1, T2, T3, T4)
             (T0, T1, T2, T3, T4, T5)
             (T0, T1, T2, T3, T4, T5, T6)
           and 155 others
   = note: required for `Vec<seahorse_util::Mutable<Guest>>` to implement `BorshSerialize`
   = help: see issue #48214
   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   = note: this error originates in the derive macro `AnchorSerialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `seahorse_util::Mutable<Guest>: BorshDeserialize` is not satisfied
  --> programs/rizz/src/dot/program.rs:38:1
   |
38 | #[account]
   | ^^^^^^^^^^ the trait `BorshDeserialize` is not implemented for `seahorse_util::Mutable<Guest>`
   |
   = help: the following other types implement trait `BorshDeserialize`:
             ()
             (T0, T1)
             (T0, T1, T2)
             (T0, T1, T2, T3)
             (T0, T1, T2, T3, T4)
             (T0, T1, T2, T3, T4, T5)
             (T0, T1, T2, T3, T4, T5, T6)
             (T0, T1, T2, T3, T4, T5, T6, T7)
           and 119 others
   = note: required for `Vec<seahorse_util::Mutable<Guest>>` to implement `BorshDeserialize`
   = help: see issue #48214
   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
   = note: this error originates in the derive macro `AnchorDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant