title: swift Unary operator '++' cannot be applied to an operand of type 'Int!'
body: <p>In the section Basic Operators, the Swift Programming Language guide states that ++ is a valid operator:</p>
  
  <blockquote>
    <p>“More complex examples include the logical AND operator &amp;&amp; (as in if
    enteredDoorCode &amp;&amp; passedRetinaScan) and the increment operator ++i,
    which is a shortcut to increase the value of i by 1.” Excerpt From:
    Apple Inc. “The Swift Programming Language.” iBooks.
    <a href="https://itun.es/gb/jEUH0.l" rel="nofollow">https://itun.es/gb/jEUH0.l</a></p>
  </blockquote>
  
  <p>However, when attempting this in a playground:</p>
  
  <pre><code>class Levels {
      var data = [
          [
              "nodesNum" : 20,
              "lastLevel" : false
          ],
          [
              "nodesNum" : 16,
              "lastLevel" : false
          ],
          [
              "nodesNum" : 13,
              "lastLevel" : false
          ],
          [
              "nodesNum" : 10,
              "lastLevel" : false
          ],
          [
              "nodesNum" : 8,
              "lastLevel" : true
          ]
      ]
  }
  
  var levels: Levels!
  var availableNodesNum: Int!
  var currentLevelData: NSDictionary!
  var levelNum:Int = 2
  
  levels = Levels()
  
  currentLevelData = levels.data[levelNum]
  availableNodesNum = Int(currentLevelData["nodesNum"]! as! NSNumber)
  
  println(currentLevelData)
  println(availableNodesNum)
  
  availableNodesNum++
  </code></pre>
  
  <p>A build error shows:</p>
  
  <blockquote>
    <p>swift Unary operator '++' cannot be applied to an operand of type
    'Int!'</p>
  </blockquote>
  
  <p>Why? Thnx for all your help</p>