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

Support matching on chars #546

Open
Nadrieril opened this issue Feb 10, 2025 · 0 comments
Open

Support matching on chars #546

Nadrieril opened this issue Feb 10, 2025 · 0 comments
Assignees
Labels
C-unsupported-language-feature A rust feature we don't extract well

Comments

@Nadrieril
Copy link
Member

This code:

fn main() {
    match 'x' {
        'a' => {}
        _ => {}
    }
}

Causes a panic:

error[E9999]: Unexpected switch_ty: Ty { kind: Node { id: Id { id: 5 }, value: Char } }
  |
  = note: ⚠️ This is a bug in Hax's frontend.
          Please report this error to https://github.com/hacspec/hax/issues with some context (e.g. the current crate)!

error: Hax panicked when translating ...

It seems we never tested matching on chars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-unsupported-language-feature A rust feature we don't extract well
Projects
None yet
Development

No branches or pull requests

1 participant