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

Bitstruct negate fails in some cases #1213

Closed
cbuttner opened this issue Jun 28, 2024 · 1 comment
Closed

Bitstruct negate fails in some cases #1213

cbuttner opened this issue Jun 28, 2024 · 1 comment
Assignees
Labels
bug Something isn't working fixed needs check Fixed, but needs verification that it works

Comments

@cbuttner
Copy link

bitstruct Flags : int {
  bool flag1;
  bool flag2;
}

fn void main() {
  Flags flags;
  flags = ~flags; // works

  flags = ~Flags {}; // doesn't work (flags is zero)

  const Flags FLAGS = {.flag1};
  flags = ~FLAGS; // doesn't work (flags is zero)
}
@lerno lerno self-assigned this Jun 28, 2024
@lerno lerno added the bug Something isn't working label Jun 28, 2024
@lerno lerno added the fixed needs check Fixed, but needs verification that it works label Jun 28, 2024
@cbuttner
Copy link
Author

cbuttner commented Jul 1, 2024

Thanks, it's fixed.

@cbuttner cbuttner closed this as completed Jul 1, 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 check Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants