Skip to content

enum types should not allow use of null as a value.  #30

@bobjervis

Description

@bobjervis

if you have enum, e, you can write 'e = null'' of 'if (e != null)...'. These do not have any meaning under the revised semantics for Parasol enums. In the new semantics, there is a one-to-one mapping between all possible enum values and integers, where the first enum constant in a type is assigned value zero, and all others increment the value by one. Conversion to or from any other numeric or address type preserves that value, to the extent possible.

So, the type analysis code needs to disallow those cases that are currently allowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions