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

Print this page

        

@@ -2,16 +2,16 @@
  * @test /nodynamiccopyright/
  * @summary Value types do not support finalize
  * @modules java.base/jvm.internal.value
  * @compile/fail/ref=CheckFinalize.out -XDrawDiagnostics -Werror -Xlint:values  CheckFinalize.java
  */
-@jvm.internal.value.DeriveValueType
+@jvm.internal.value.ValueCapableClass
 final class CheckFinalize {
     @Override
     protected void finalize() {} // <-- error
 
-    @jvm.internal.value.DeriveValueType
+    @jvm.internal.value.ValueCapableClass
     final class CheckFinalizeInner {}
 
     void foo(CheckFinalizeInner cfi, CheckFinalize cf) {
         cfi.finalize();          // Error
         cf.finalize();           // OK.