title: Type inference broken with fluent API
body: <p>I try to write following code:</p>
  
  <pre><code>Map&lt;String, String&gt; m = new HashMap&lt;&gt;();
  // ... populate the map
  m.entrySet().stream()
        .sorted(Comparator.comparing(e -&gt; e.getKey()).reversed())
        .forEach(System.out::println);
  </code></pre>
  
  <p>This does not compile, because the inferred type for <code>e</code> is <code>Object</code>. However, if I remove the <code>.reversed()</code> call, the inference works. I have to spell out the type for <code>e</code>, which is ugly:</p>
  
  <pre><code>      .sorted(Comparator.comparing((Map.Entry&lt;String, String&gt; e) -&gt; e.getKey()).reversed())
  </code></pre>
  
  <p>Compiler can infer the type for <code>Comparator.comparing</code>, but when I add <code>reversed()</code>, it cannot. Why?</p>