title: Why does this compile under Java 7 but not under Java 8?
body: <p>This seems to compile fine with Java 7, and any version of the Scala libraries:</p>
  
  <pre><code>public static void main(String[] args) {
      scala.collection.immutable.Set&lt;String&gt; set = new scala.collection.immutable.HashSet&lt;String&gt;();
      Iterator&lt;String&gt; iterator = set.iterator();
  }
  </code></pre>
  
  <p>It also compiles fine with Java 8 and Scala 2.11.5+. But with Java 8 and Scala 2.11.4, Eclipse complains:</p>
  
  <pre class="lang-none prettyprint-override"><code>The method iterator() is ambiguous for the type Set&lt;String&gt;
  </code></pre>
  
  <p>I don't understand this. You might get ambiguity over which overloaded method to select in some contexts, but surely not if you're not passing any arguments?</p>
  
  <p>The really weird thing is that if I recast it like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>public static void main(String[] args) {
      Iterator&lt;String&gt; iterator = new scala.collection.immutable.HashSet&lt;String&gt;().iterator();
  }
  </code></pre>
  
  <p>then the complaint goes away. This seems to me to be exactly equivalent to the version above. So why would it now compile fine?</p>