title: Apparent type violation, but compiles
body: <p>Why does the below snippet compile ? <code>OtherInterface</code> does not extends <code>Concrete</code> so I would have bet a kidney that this wouldn't compile. But it does.</p>
  
  <pre><code>public class Test {
  
      public static interface SomeInterface {}
  
      public static interface OtherInterface{}
  
      public static class Concrete implements SomeInterface {
  
         public &lt;T extends Concrete&gt; T getConcrete() {
              return null;
         }
      }
  
      public static void doStuff() {
          Concrete c = new Concrete();
          OtherInterface iCompile = c.getConcrete();
      }
  }
  </code></pre>
  
  <p>On the other hand, the next snippet does not compile, which is what I expect.</p>
  
  <pre><code>public class Test {
  
      public static interface SomeInterface {}
  
      public static class UnrelatedClass{}
  
      public static class Concrete implements SomeInterface {
  
         public &lt;T extends Concrete&gt; T getConcrete() {
              return null;
         }
      }
  
      public static void doStuff() {
          Concrete c = new Concrete();
          UnrelatedClass iCompile = c.getConcrete();
      }
  }
  </code></pre>