Skip to content

In Stylus, custom types in Solidity (such as struct) are not supported. #321

@Subway2023

Description

@Subway2023
struct S {
    uint16 a;
    function() external returns (uint) x;
    uint16 b;
}
contract Flow {
    S[2] t;
}
sol_storage! {
    #[entrypoint]
    pub struct Counter {
        struct S {
            uint16 a;
            function() external returns (uint) x;
            uint16 b;
        }
        S[2] t;
    }
}

compile errer

error: expected identifier, found keyword `struct`
  --> src/lib.rs:40:9
   |
40 |         struct S {
   |         ^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions