title: Swift - Cannot reference a local function with capture from another function
body: <p>i'm trying to create a vary simple game on Swift based on Balloons.playground (that Apple showed on WWDC). There is code that Apple provides:</p>
  
  <pre><code>func fireCannon(cannon: SKNode) {
      let balloon = createRandomBalloon()
      displayBalloon(balloon, cannon)
      fireBalloon(balloon, cannon)
  }
  
  let leftBalloonCannon = scene.childNodeWithName("//left_cannon")!
  let left = SKAction.runBlock { fireCannon(leftBalloonCannon) }
  </code></pre>
  
  <p>I do the same (i suppose): </p>
  
  <pre><code>func displayFruit(xPos: CGFloat) -&gt; Void {
      let fruit = SKSpriteNode(imageNamed: "Banana")
      fruit.size = CGSize(width: 100, height: 100)
      fruit.position = CGPoint(x:xPos, y: 800)
      fruit.physicsBody = SKPhysicsBody(texture: fruit.texture, size: fruit.size)
      fruit.physicsBody?.affectedByGravity = true       
      self.addChild(fruit)
  }
  
  let start = SKAction.runBlock { displayFruit(100) }
  </code></pre>
  
  <p>This code above i put at <code>override func didMoveToView(view: SKView)</code></p>
  
  <p>I get an error: Cannot reference a local function with capture from another function</p>
  
  <p>I know there was very the same questions, but solutions there don't seemed helpful for me.
  What would be the right way to do this?
  Thank you!</p>