<div dir="ltr"><div class="gmail_extra">Hi!</div><div class="gmail_extra"><br></div><div class="gmail_extra">On Fri, Feb 28, 2014 at 7:54 PM, tom kelly <span dir="ltr"><<a href="mailto:ttom.kelly@gmail.com" target="_blank">ttom.kelly@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
-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></blockquote></div><br><div class="gmail_extra">
Looks like a bug to me, especially since changing the first clause to </div><div class="gmail_extra">my_function1(#my_rec{field1 = {tag, _}, field2 = _}) -> 1;<br></div><div class="gmail_extra">gives a warning for the first function too.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">regards,</div><div class="gmail_extra">Vlad</div><div class="gmail_extra"><br></div></div></div>