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

Enum to int casting fails with subtype mismatch #122

Closed
franziskuskiefer opened this issue Jan 3, 2025 · 0 comments · Fixed by #130
Closed

Enum to int casting fails with subtype mismatch #122

franziskuskiefer opened this issue Jan 3, 2025 · 0 comments · Fixed by #130

Comments

@franziskuskiefer
Copy link
Collaborator

enum E {
    One = 1,
    Five = 5,
}

fn fun(e: E) -> i32 {
    e as i32
}

fails with a subtype mismatch

subtype mismatch:
  bool (a.k.a. bool) vs:
  bool_t (a.k.a. bool_t)
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

Successfully merging a pull request may close this issue.

1 participant