title: One-line closure without return type
body: <p>In Swift, if a closure holds only a single statement, it automatically returns the value returned from that single statement.</p>
  
  <p>This does not feel very natural in all cases. Let's look at an example:</p>
  
  <pre><code>func StringReturningFunc() -&gt; String {
      return "Test String"
  }
  
  // Error: Cannot convert the expressions type '() -&gt; $T0' to type 'String'
  let closure: () -&gt; () = {
      StringReturningFunc()
  }
  </code></pre>
  
  <p>As you can see, even though the closure should only call a simple function, it tries to automatically return it's return value, which is of type <code>String</code>, and does not match the return type <code>void</code>.</p>
  
  <p>I can prevent this by implementing the closures body like so:</p>
  
  <pre><code>let _ = StringReturningFunc()
  </code></pre>
  
  <p>Which feels incredibly odd.</p>
  
  <p>Is there a better way to do this or is this just something I have to live with?</p>