[erlang-questions] Dialyzer warning on pattern match with sub-record
Russell Brown
russell@REDACTED
Thu Mar 30 16:32:22 CEST 2017
On 30 Mar 2017, at 15:26, Alex S. <alex0player@REDACTED> wrote:
>>
>> 30 марта 2017 г., в 11:12, Russell Brown <russell@REDACTED> написал(а):
>>
>>
>> On 30 Mar 2017, at 09:08, Alex S. <alex0player@REDACTED> wrote:
>>
>>>>
>>
>> I checked, it does not. This is very confusing. I can quite easily call the function with use=false, by changing a setting in riak’s advanced.config. Is the fact that this value comes from an app variable the problem?
>
> So, it executed correctly with use=false, without errors, and dialyzer still reports it? Then that is a bug. Dialyzer should never report bugs in working code.
Current thinking from the reviewer (Doug Rohrer, I know he’s on this list!) is that this head/match is now redundant, since the functions that call it check for use=true before calling new_key_epoch. So dialzyer is correct, the function only ever gets called with `true` now. Once again the age old refrain “never argue with dialyzer”. I hope that someone learned something so this thread wasn’t a complete waste of time.
Thanks, and thanks to all who replied.
Cheers
Russell
>
>>
>>>>>>
>>>>>> Russell
>>>>>>
>>>>>> _______________________________________________
>>>>>> erlang-questions mailing list
>>>>>> erlang-questions@REDACTED
>>>>>> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list