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

Matches: guards are dropped! #807

Closed
3 tasks
Tracked by #806
W95Psp opened this issue Jul 29, 2024 · 1 comment
Closed
3 tasks
Tracked by #806

Matches: guards are dropped! #807

W95Psp opened this issue Jul 29, 2024 · 1 comment
Labels
bug Something isn't working engine Issue in the engine

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented Jul 29, 2024

The following example:

fn f(x: u8) -> bool {
    match x {
        _ if x > 20 => true,
        _ => false,
    }
}

Open this code snippet in the playground

Is translated without any guards!

Action items:

  • add guards in arms in the AST, feature-gate them
  • add a rejection phase and reject them for most backends (at least for now)
  • investigate how mutation behaves there
@W95Psp W95Psp added bug Something isn't working engine Issue in the engine labels Jul 29, 2024
@W95Psp
Copy link
Collaborator Author

W95Psp commented Aug 5, 2024

Closed by #821

@W95Psp W95Psp closed this as completed Aug 8, 2024
@github-project-automation github-project-automation bot moved this to Done in hax Aug 8, 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 engine Issue in the engine
Projects
None yet
Development

No branches or pull requests

1 participant