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
Since <> concatenates two binaries, I would have expected this to work, just like "fixed_pattern" <> rest = whatever works, but it doesn't.
<>
"fixed_pattern" <> rest = whatever
root = "/home/msch/code" path = "/home/msch/code/project/some/file.ex" (^root <> rest) = path
** (CompileError) iex:7: a binary field without size is only allowed at the end of a binary pattern
I've got to do this:
root = "/home/msch/code" path = "/home/msch/code/project/some/file.ex" root_size = byte_size(root) <<^root::binary-size(root_size), rest::binary>> = path
Is this a bug or an inherent limitation?
The text was updated successfully, but these errors were encountered:
We can only fix this if we fix it directly in Erlang because we could not precalculate the size in function clauses where the same issue could happen.
Sorry, something went wrong.
No branches or pull requests
Since
<>
concatenates two binaries, I would have expected this to work, just like"fixed_pattern" <> rest = whatever
works, but it doesn't.I've got to do this:
Is this a bug or an inherent limitation?
The text was updated successfully, but these errors were encountered: