1 /*
 2  * @test /nodynamiccopyright/
 3  * @bug 8237072
 4  * @summary Test various relationships between a value type and its reference projection.
 5  * @compile/fail/ref=OverloadingPhaseTest.out -XDrawDiagnostics OverloadingPhaseTest.java
 6  */
 7 
 8 public class OverloadingPhaseTest {
 9 
10     static primitive class V.val {
11         int x = 0;
12     }
13 
14     static String roo(V v, int i) {
15         return "Phase 1";
16     }
17 
18     static String roo(V v, Integer i) {
19         return "Phase 2";
20     }
21 
22     public static void main(String args) {
23         V.val o = new V();
24         String result;
25 
26         if (!(result = roo(o, 0)).equals("phase 2"))
27             throw new AssertionError("Broken: got " + result);
28         if (!(result = roo(o, Integer.valueOf(0))).equals("phase 2"))
29             throw new AssertionError("Broken: got " + result);
30     }
31 }