1 /*
 2  * @test /nodynamiccopyright/
 3  * @bug 8282107
 4  * @summary Check that javac can compile against value classes at lower source levels
 5  * @compile GenericPoint.java
 6  * @compile ConsumeValueClassAtLowerLevel.java
 7  * @compile/fail/ref=ConsumeValueClassAtLowerLevel.out --source 16 -XDrawDiagnostics ConsumeValueClassAtLowerLevel.java
 8  */
 9 
10 public class ConsumeValueClassAtLowerLevel {
11     void m() {
12         /* GenericPoint was compiled with a source that allows value classes but ConsumeValueClassAtLowerLevel was not
13          * so GenericPoint has a <vnew> initializer but in a source that doesn't allow value classes we look for <ini>
14          * thus the compiler error in the second compilation of ConsumeValueClassAtLowerLevel.java
15          */
16         GenericPoint<Integer> gl = new GenericPoint<>(0, 0);
17     }
18 }