title: Swift completion block
body: <p>I'm having a hard time understanding a problem I'm having.
  To simplify, I'll use UIView method.
  Basically, if I write the method</p>
  
  <pre><code>UIView.animateWithDuration(1, animations:  {() in
          }, completion:{(Bool)  in
              println("test")
      })
  </code></pre>
  
  <p>it works fine.
  Now, if I do the same method, but creating a string like so:</p>
  
  <pre><code>    UIView.animateWithDuration(1, animations:  {() in
          }, completion:{(Bool)  in
              String(23)
      })
  </code></pre>
  
  <p>It stops working. Compiler error: <strong>Missing argument for parameter 'delay' in call</strong></p>
  
  <p>Now, here's the strange part. If I do the exact same code as the one that fails, but just add a print command like so:</p>
  
  <pre><code>   UIView.animateWithDuration(1, animations:  {() in
          }, completion:{(Bool)  in
              String(23)
              println("test")
      })
  </code></pre>
  
  <p>it starts to work again.</p>
  
  <p>My problem is basically the same thing. My code:</p>
  
  <pre><code>   downloadImage(filePath, url: url) { () -&gt; Void in
           self.delegate?.imageDownloader(self, posterPath: posterPath)
          }
  </code></pre>
  
  <p>Doesn't work. But if I change to.</p>
  
  <pre><code> downloadImage(filePath, url: url) { () -&gt; Void in
               self.delegate?.imageDownloader(self, posterPath: posterPath)
                  println("test")
              }
  </code></pre>
  
  <p>or even:</p>
  
  <pre><code>downloadImage(filePath, url: url) { () -&gt; Void in
               self.delegate?.imageDownloader(self, posterPath: posterPath)
               self.delegate?.imageDownloader(self, posterPath: posterPath)
              }
  </code></pre>
  
  <p>It works fine.
  I can't understand why this is happening. I'm close to accept that it's a compiler bug.</p>