title: Crystal lang: understanding method return type of Void
body: <p>It's not documented on the docs. But through experiments I've found out that typing the return type of method as Void, cancels the "last statement return" (that is good) making it returning Nil. </p>
  
  <p><code>def foo; "baz"; end #=&gt; "baz" : String</code></p>
  
  <p><code>def foo : Void; "baz"; end</code> #=> nil</p>
  
  <p><code>def foo : Nil; "baz"; end</code> #=> nil</p>
  
  <p>The question is:</p>
  
  <p>is above assumption correct?</p>
  
  <p>Is there any difference between Void and Nil method return type?</p>