test/tools/javac/valhalla/minimalvalues/CheckCyclicMembership.java

Print this page

        

@@ -2,16 +2,16 @@
  * @test /nodynamiccopyright/
  * @summary Value types may not declare fields of its own type either directly or indirectly.
  * @modules java.base/jvm.internal.value
  * @compile/fail/ref=CheckCyclicMembership.out -XDrawDiagnostics -Werror -Xlint:values CheckCyclicMembership.java
  */
-@jvm.internal.value.DeriveValueType
+@jvm.internal.value.ValueCapableClass
 final class CheckCyclicMembership {
     class InnerRef {
         CheckCyclicMembership ccm;
     }
-    @jvm.internal.value.DeriveValueType final class InnerValue {
+    @jvm.internal.value.ValueCapableClass final class InnerValue {
         final CheckCyclicMembership ccm = new CheckCyclicMembership(); // Error.
     }
     final CheckCyclicMembership ccm = new CheckCyclicMembership(); // Error.
     final int i = 10;
     final String s = "blah";