title: unexpected instance method function ... found in unbound lookup
body: <p>Why is an instance needed for field <code>whyIsAnInstanceRequired</code> and won't work as in field <code>errWhyIsAnInstanceRequired</code>?</p>
  
  <p>The compile error is: </p>
  
  <pre><code>Error: java: incompatible types: invalid method reference
              unexpected instance method function(programming.java.FunctionalQuestion.Helper,programming.java.FunctionalQuestion) found in unbound lookup
  </code></pre>
  
  <p>See code: </p>
  
  <pre><code>public class FunctionalQuestion {
  
      class Helper { }
  
      public void setValue (long value) { }
  
      ObjLongConsumer&lt;FunctionalQuestion&gt; whyIsAnInstanceNotRequired =
          FunctionalQuestion::setValue;
  
      public void function(Helper helper, FunctionalQuestion functionalQuestion) { }
  
      BiConsumer&lt;Helper, FunctionalQuestion&gt; whyIsAnInstanceRequired =
          new FunctionalQuestion()::function;
  
      /*
      * Error: java: incompatible types: invalid method reference
          unexpected instance method function(programming.java.FunctionalQuestion.Helper,programming.java.FunctionalQuestion) found in unbound lookup
      * */
      BiConsumer&lt;Helper, FunctionalQuestion&gt; errWhyIsAnInstanceRequired =
          FunctionalQuestion::function;
  
  }
  </code></pre>