title: Why doesn't CompletableFuture.complete() throw a ClassCastException when completed with wrong type
body: <p>This code doesn't print anything, and doesn't throw any error:</p>
  
  <pre><code>    CompletableFuture&lt;Integer&gt; publicStage = new CompletableFuture&lt;&gt;();
      publicStage.thenAccept(i -&gt; System.out.println("i = " + i));
  
      CompletableFuture&lt;String&gt; cfs = (CompletableFuture)publicStage;
      cfs.complete("foo");
  </code></pre>
  
  <p>It's because the function in thenAccept never gets called, I would have expected some sort of error being thrown, instead of it just dropping the function and continuing on.</p>