title: Calling Overridden Default Method from Anonymous Inner Class
body: <p>Consider this code:</p>
  
  <pre><code>interface A {
      default void doA() {
          System.out.println("a");
      } 
  }
  
  interface B {
      void doB(); 
  }
  
  class Test implements A {
  
      @Override
      public void doA() {        
          // Works
          B b = () -&gt; A.super.doA();
          b.doB();
  
          // Does not compile
          /*
          new B() {      
              public void doB() {  
                  A.super.doA();
              }       
          }.doB();
          */
      }
  
      public static void main(String[] args) {
          new Test().doA();
      }
  
  }
  </code></pre>
  
  <p>This is contrived, but basically <code>Test::doA()</code> tries to wrap <code>this</code> as a <code>B</code> and have <code>B::doB()</code> call its super function <code>A.super.doA()</code>. </p>
  
  <p>I can call <code>A.super.doA()</code> in a lambda of type <code>B</code> just fine. But I cannot figure out the syntax of calling <code>A.super.doA()</code>
  inside an anonymous <code>B</code>. See the commented out code. </p>
  
  <p>Any ideas?</p>