<html><head></head><body><div class="ydp30de0fd2yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div id="ydp30de0fd2yiv9722095929"><div><div class="ydp30de0fd2yiv9722095929ydp66a0db92yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:10px;"><div><div><span><div>Sorry for disturbing Frank!<br></div></span></div><div>Now the new thread for discussion of dialyzer issues ..........</div><div><br></div><div>Hi guys I have moved dialyzer discussions on this thread, so we can continue here! <br></div><div><br></div><br><div>Code example <br></div><div>=======================================================</div><div><span>-module(helloworld).<br>-export([start/0]).<br>%%-export([validator/1]).<br><br>start()-><br>    try <br>        validator(undefined),<br>        validator([]),<br>        validator(3)<br>    catch<br>          exit:Reason-><br>              {error, Reason}    <br>    end.<br><br>%%%###=======================================================================###<br>-spec validator(X::any())->no_return().<br>%%%###=======================================================================###          <br>validator([])-><br>exit({error, "empty list"});            <br>           <br>validator(undefined) -><br>exit({error, undefined});<br><br>validator(_Any)-><br>exit({error,"unknown"}).<br><br></span><div>=========================================================================================</div><div>When function in module validator/1 is not exported, dialyzer gives warnings.</div><div><span> Checking whether the PLT /home/eweiwan/.dialyzer_plt is up-to-date... yes<br>  Proceeding with analysis...<br>helloworld.erl:18: The pattern [] can never match the type 'undefined'<br>helloworld.erl:24: The variable _Any can never match since previous clauses completely covered the type 'undefined'<br> done in 0m1.45s<br>done (warnings were emitted)   <<<<<<<<<<<<<<<<<<<<<<<<<<<br>-------------------------------------------------------------------------------------------------------------------------------------------------<br></span><div>When function is exported, dialyzer result :</div><div><br></div></div><div> <span> Checking whether the PLT /home/eweiwan/.dialyzer_plt is up-to-date... yes<br>  Proceeding with analysis... done in 0m1.55s<br>done (passed successfully)    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<br></span><div><span>---------------------------------------------------------------------------------------------------------------------------------------------------</span></div><div><span></span><br></div><div>What is the best solution to avoid dialyzer warnings meanwhile also satisfy my use cases.?</div><div><br></div><div>Thank you <br></div><div>BR//Wei<br></div><div><br></div><div><br></div><br></div></div><br></div></div></div></div></div></body></html>