title: Swift 3.0 sort - Argument passed to call that takes no arguments
body: <p>I am currently trying to port some Swift 2 code to Swift 3.0.</p>
  
  <p>Here is one line of code that is driving  me crazy.</p>
  
  <pre><code>    public private(set) var searchHistory: [SearchHistoryEntry] = [SearchHistoryEntry]() // Struct that is cComparable 
  ....
  ...
      searchHistory.sortInPlace({ $0.lastUsage.isAfter($1.lastUsage) })
  </code></pre>
  
  <p>This is my Swift 3.0 Version</p>
  
  <pre><code>searchHistory.sort(by:{ $0.lastUsage.isAfter($1.lastUsage) })
  </code></pre>
  
  <p>lastUsage is of Type <strong>Date</strong></p>
  
  <p>The Compiler complains with the following error message</p>
  
  <p><strong>Argument passed to call that takes no arguments</strong> </p>
  
  <p>Any Ideas what I am doing wrong? 
  I really don not understand what the compiler wants to tell.
  Sort takes a block and I pass it, everything should be fine.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found the mistake. Swift converted all NSDate properties to Date and we got an extension called <em>isAfter</em> on NSDate. So the compiler could not found isAfter anymore. The compiler error message was completely misleading.</p>