title: Groovy generic type that extends trait mismatch - not a valid substitute for the bounded parameter
body: <p>Code below is not compiling in Groovy 3.0.4 (although its fine with Groovy 2.5.0 and below)</p>
  
  <pre><code>Factory&lt;SomeImpl&gt; f = new Factory&lt;&gt;();
  
  trait Base {}
  class SomeImpl implements Base {}
  class Factory&lt;T extends Base&gt; {}
  </code></pre>
  
  <p>Exact error which I get is:</p>
  
  <pre><code>The type SomeImpl is not a valid substitute for the bounded parameter &lt;T extends Base&gt; @ line 1, column 9.
  Factory&lt;SomeImpl&gt; f = new Factory&lt;&gt;();
  </code></pre>
  
  <p>Changing <strong>Base</strong> from <strong>trait</strong> to <strong>interface</strong> allows the code to be compiled as expected and it works (like in Java).</p>
  
  <p>Is trait somewhat different from the interface that does not allow us to do such constructs? or is it a bug in recent groovy versions?</p>