title: NSCompoundPredicate error in Xcode 6.1
body: <p>Back in Xcode 6, in a project using Core Data I had the following line. It worked fine.</p>
  
  <pre><code>fetchRequest.predicate = NSCompoundPredicate(type: .AndPredicateType, subpredicates: [predicate, datePredicate])
  </code></pre>
  
  <p><em>predicate</em> and <em>datePredicate</em> are of <code>NSPredicate</code> type.</p>
  
  <p>Yesterday I updated to Xcode 6.1 and now this above line gives this error <strong>Could not find member 'AndPredicateType'</strong>. Specifying the entire value like this <code>NSCompoundPredicateType.AndPredicateType</code> didn't work either.</p>
  
  <p>Then I changed the line to use its convenience method line below.</p>
  
  <pre><code>fetchRequest.predicate = NSCompoundPredicate.andPredicateWithSubpredicates([predicate, datePredicate])
  </code></pre>
  
  <p>Now I get a new error <strong>Cannot convert the expression's type '()' to type 'NSPredicate?'</strong>. I don't understand why. The <a href="https://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/Classes/NSCompoundPredicate_Class/index.html" rel="nofollow">documentation</a> doesn't show any deprecations or changes to <code>NSCompoundPredicate</code> either.</p>
  
  <p>Can anyone please tell me how to correct this?</p>
  
  <p>Thank you.</p>