title: cyclic inference java lambda groupingby
body: <p>I'm new to lambdas and confused with what I'm doing wrong in this line of code:</p>
  
  <pre><code>HashMap&lt;Date, ArrayList&lt;Trade&gt;&gt; groupTrades = allTrades.stream().collect(Collectors.groupingBy(Trade::getTradeDate()));
  </code></pre>
  
  <p>IntelliJ won't compile because of a cyclic inference.</p>