< prev index next >

test/compiler/inlining/DefaultAndConcreteMethodsCHA.java

Print this page

        

@@ -24,22 +24,25 @@
 /**
  * @test
  * @bug 8031695
  * @summary CHA ignores default methods during analysis leading to incorrect code generation
  *
- * @run main/othervm -Xbatch DefaultAndConcreteMethodsCHA
+ * @run main/othervm -Xbatch compiler.inlining.DefaultAndConcreteMethodsCHA
  */
-interface I {
+
+package compiler.inlining;
+
+public class DefaultAndConcreteMethodsCHA {
+    interface I {
     default int m() { return 0; }
-}
+    }
 
-class A implements I {}
+    static class A implements I {}
 
-class C extends A { }
-class D extends A { public int m() { return 1; } }
+    static class C extends A { }
+    static class D extends A { public int m() { return 1; } }
 
-public class DefaultAndConcreteMethodsCHA {
     public static int test(A obj) {
         return obj.m();
     }
     public static void main(String[] args) {
         for (int i = 0; i < 10000; i++) {
< prev index next >