We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Just creating an issue to discuss this, there might not be much we can or should do about it.
Basically the bitarray syntax allows you to read more bits than is in the bit array, leading to a runtime error.
let a = <<1, 2, 3>> let b = <<a:32-bits>>
erlang:error(Badarg)
If this was an integer instead of a bit array, it would be zero padded. Maybe we could do that.
The text was updated successfully, but these errors were encountered:
We could statically reject the specific case of <<a:32-bits>> as we can tell the size is longer than the array?
<<a:32-bits>>
What code would we generate if we were to pad it?
Sorry, something went wrong.
No branches or pull requests
Just creating an issue to discuss this, there might not be much we can or should do about it.
Basically the bitarray syntax allows you to read more bits than is in the bit array, leading to a runtime error.
If this was an integer instead of a bit array, it would be zero padded. Maybe we could do that.
The text was updated successfully, but these errors were encountered: