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
Original reporter: josevalim Affected versions: OTP-19.0, OTP-20.0 Fixed in version: OTP-19.2 Component: compiler Migrated from: https://bugs.erlang.org/browse/ERL-268
josevalim
OTP-19.0
OTP-20.0
OTP-19.2
compiler
The following module: {code:erlang} -module(foo). -export([first_after/2, match_first/2]). first_after(Data, Offset) -> case byte_size(Data) > Offset of false -> {First, Rest} = {ok, ok}, ok; true -> <<_:Offset/binary, Rest/binary>> = Data, {First, _} = match_first(Data, Rest), {First, Rest} = {First, Rest}, First end. match_first(_, <<First:1/binary, Rest/binary>>) -> {First, Rest}. {code} fails to compile with: {code} foo: function first_after/2+15: Internal consistency check failed - please report this bug. Instruction: {call,2,{f,7}} Error: {multiple_match_contexts,[{x,1},0]}: foo.erl:7: Warning: variable 'First' is unused foo.erl:7: Warning: variable 'Rest' is unused}} {code} The error happens on Erlang 19 and master.
The text was updated successfully, but these errors were encountered:
bjorn said:
bjorn
I have created a pull request: https://github.com/erlang/otp/pull/1192
Sorry, something went wrong.
bjorng
No branches or pull requests
Original reporter:
josevalim
Affected versions:
OTP-19.0
,OTP-20.0
Fixed in version:
OTP-19.2
Component:
compiler
Migrated from: https://bugs.erlang.org/browse/ERL-268
The text was updated successfully, but these errors were encountered: