title: "Adjacent operators are in non-associative precedence group 'ComparisonPrecedence'" error in Swift
body: <p>In other languages, I've done logical expressions like this one without any issues, but I'm having a tough time in Swift. </p>
  
  <p>I want this to evaluate as true if appPurchased = false AND enabled = true AND the button equals either photoLibraryBtn or takeVideoBtn:</p>
  
  <pre><code>for button in buttonList {
  
      if appPurchased == false &amp;&amp;
          enabled == true &amp;&amp;
          button == photoLibraryBtn |
          button == takeVideoBtn {
  
          continue
  
      }
  
      button.isEnabled = enabled
      button.isUserInteractionEnabled = enabled
      button.alpha = alpha
  
  }
  </code></pre>
  
  <p>I get the error "Adjacent operators are in non-associative precedence group 'ComparisonPrecedence'", which I can find no results on Google. I also don't see examples such as mine in Swift, so I'm thinking they did away with the single "|" pipe character, and you're only supposed to use the double pipe "||", but in a certain order. However, I don't want the if statement to pass as true if appPurchased = false, enabled = true, button = photoLibraryBtn OR button = takeVideoBtn.</p>