Skip to content

Disallow duplicated enum variant indices #507

Open
@nazar-pc

Description

@nazar-pc

Currently it is possible to do this:

#[derive(Encode, Decode)]
enum E {
    #[codec(index = 0)]
    A,
    #[codec(index = 0)]
    B,
}

Logically it seems like an error and should not compile at all. Admittedly this is a minor issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions