Skip to content

C-like enums don't accept uint discriminants #7994

Closed
@kemurphy

Description

@kemurphy

Currently, the following fails to compile, with errors about expecting int instead of uint:

enum Animal {
  Cat = 0u,
  Dog = 1u
}

Is there any reason why this should be disallowed?

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