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

Assertion failed when casting argument to enum #1196

Closed
cbuttner opened this issue May 16, 2024 · 2 comments
Closed

Assertion failed when casting argument to enum #1196

cbuttner opened this issue May 16, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works

Comments

@cbuttner
Copy link
Contributor

enum Mouse_Button {
  LEFT,
  RIGHT,
  MIDDLE,
}

fn void foo(Mouse_Button button) {
}

fn void main() {
  uint x = 1;
  foo((Mouse_Button)x);
}
Assertion failed: (be_value->type->canonical == type), function llvm_emit_parameter, file llvm_codegen_expr.c, line 5137.

On dev branch.

@lerno lerno self-assigned this May 16, 2024
@lerno lerno added the Bug Something isn't working label May 16, 2024
@lerno lerno added the Fixed Needs Verification Fixed, but needs verification that it works label May 16, 2024
@lerno
Copy link
Collaborator

lerno commented May 16, 2024

Should work now.

@cbuttner
Copy link
Contributor Author

cbuttner commented Jun 6, 2024

Looks fixed.

@cbuttner cbuttner closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants