Desugar: make companion class an inner class

IntelliJ's debugger is not aware of the companion class synthesized
by D8 when desugaring. By making it an inner class of the interface
being desugared, we match the behavior of anonymous classes.

Bug: 77560662
Change-Id: Ia5d43794b031e7ae9c9b865f5e76d3e3934eca8b
diff --git a/src/test/debugTestResourcesJava8/DebugInterfaceMethod.java b/src/test/debugTestResourcesJava8/DebugInterfaceMethod.java
index b407698..f951357 100644
--- a/src/test/debugTestResourcesJava8/DebugInterfaceMethod.java
+++ b/src/test/debugTestResourcesJava8/DebugInterfaceMethod.java
@@ -4,21 +4,10 @@
 
 public class DebugInterfaceMethod {
 
-  interface I {
-    default void doSomething(String msg) {
-      String name = getClass().getName();
-      System.out.println(name + ": " + msg);
-    }
-
-    static void printString(String msg) {
-      System.out.println(msg);
-    }
+  static class DefaultImpl implements InterfaceWithDefaultAndStaticMethods {
   }
 
-  static class DefaultImpl implements I {
-  }
-
-  static class OverrideImpl implements I {
+  static class OverrideImpl implements InterfaceWithDefaultAndStaticMethods {
 
     @Override
     public void doSomething(String msg) {
@@ -27,12 +16,12 @@
     }
   }
 
-  private static void testDefaultMethod(I i) {
+  private static void testDefaultMethod(InterfaceWithDefaultAndStaticMethods i) {
     i.doSomething("Test");
   }
 
   private static void testStaticMethod() {
-    I.printString("I'm a static method in interface");
+    InterfaceWithDefaultAndStaticMethods.printString("I'm a static method in interface");
   }
 
   public static void main(String[] args) {
diff --git a/src/test/debugTestResourcesJava8/InterfaceWithDefaultAndStaticMethods.java b/src/test/debugTestResourcesJava8/InterfaceWithDefaultAndStaticMethods.java
new file mode 100644
index 0000000..05f48ab
--- /dev/null
+++ b/src/test/debugTestResourcesJava8/InterfaceWithDefaultAndStaticMethods.java
@@ -0,0 +1,14 @@
+// Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+interface InterfaceWithDefaultAndStaticMethods {
+  default void doSomething(String msg) {
+    String name = getClass().getName();
+    System.out.println(name + ": " + msg);
+  }
+
+  static void printString(String msg) {
+    System.out.println(msg);
+  }
+}