title: Result values in '? :' expression have mismatching types '()' and 'Bool'
body: <p>I have an array of Doubles, and a button which when pressed empties the array. I want the button to be enabled only when the count of the array is greater than zero. The code is the following:</p>
  
  <pre><code>var numbers: [Double] = [] //At some point I add some numbers here
  
  numbers.count &gt; 0 ? deleteAllNumbersButton.isEnabled = true : deleteAllNumbersButton.isEnabled = false
  </code></pre>
  
  <p>The compiler complains:</p>
  
  <blockquote>
    <p>Result values in '? :' expression have mismatching types '()' and
    'Bool'</p>
  </blockquote>
  
  <p>When put in an <code>if statement</code> it works just fine though. I can't understand the issue here. Has anyone seen this before? I use XCode 8.2.1 and Swift 3.</p>