1 /*
   2  * @test /nodynamiccopyright/
   3  * @summary Value types do not support clone
   4  * @modules java.base/jvm.internal.value
   5  * @compile/fail/ref=CheckClone.out  -XDrawDiagnostics -Werror -Xlint:values CheckClone.java
   6  */
   7 @jvm.internal.value.DeriveValueType
   8 final class CheckClone {
   9     @jvm.internal.value.DeriveValueType
  10     final class InnerValue {
  11         void foo(InnerValue iv) {
  12             iv.clone(); // <-- error
  13         }
  14     }
  15     @Override
  16     protected Object clone() { return null; } // <-- error
  17 }
--- EOF ---