Skip to content

Not sufficient location information for [%%cenum] #197

@reynir

Description

@reynir

The generated code for [%%cenum] does not contain sufficient location information to give useful warnings when the user (intentionally or not) reuses the same index for an enum. The following code will generate a warning about an unused match case with location File "_none_", line 1.

[%%cenum
  type t =
    | Life    [@id 42]
    | Meaning [@id 42]
  [@@uint32_t]
]

https://gist.github.com/reynir/1c64452b2ca70606e814778572aae00e

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