<div class="gmail_quote">
<div dir="ltr">
<div>
<div class="gmail_extra">Hi List,</div>
<div class="gmail_extra"> </div>
<div class="gmail_extra">You've probably seen this on the questions mailing list, just re-posting here to follow the bug reporting guidelines:</div>
<div class="gmail_extra"> </div>
<div class="gmail_extra"><br>-module(no_warn).<br>-compile(export_all).<br><br>-record(my_rec,{field1, field2}).<br><br>my_function1(#my_rec{field1 = {tag, _}, field2 = f2}) -> 1;<br>my_function1(#my_rec{field1 = {tag, 1}, field2 = f2}) -> 2; % line 7<br>
my_function1(_) -> 3.<br><br>my_function2(#my_rec{field1 = {tag, _}}) -> 1;<br>my_function2(#my_rec{field1 = {tag, 1}}) -> 2; % line11<br>my_function2(_) -> 3.<br></div></div>
<div class="gmail_extra"> </div>
<div class="gmail_extra">When compiled on R16B03-1 this gives the output:</div>
<div class="gmail_extra"> </div>
<div class="gmail_extra">no_warn.erl:11: Warning: this clause cannot match because a previous clause at line 10 always matches</div>
<div class="gmail_extra"> </div>
<div class="gmail_extra">Ie. we are correctly warned about line 11 but not about line 7.</div>
<div class="gmail_extra"> </div>
<div class="gmail_extra">//TTom.</div></div></div>