Matching binaries in list comprehensions

Hans Bolinder hasse@REDACTED
Thu Jul 1 09:11:40 CEST 2004


> Given a list of binaries in Recs, I have the following list comprehension:
> Msgs = (catch [{Type, Value} || <<Type:16, _Len:16, Value:_Len/binary>> 
> <- Recs])
> The compiler complains:
> Warning: variable '_Len' shadowed in generate

This is a bug in the linter. We will fix it when time permits.

Thanks for pointing it out.

Best regards,

Hans Bolinder, Erlang/OTP

More information about the erlang-questions mailing list