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/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);
+ }
+}