Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
reynir opened this issue Jan 6, 2018 · 0 comments
Open

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

reynir opened this issue Jan 6, 2018 · 0 comments

Comments

@reynir
Copy link
Member

reynir commented Jan 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant