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

Print this page

        

@@ -2,11 +2,11 @@
  * @test /nodynamiccopyright/
  * @summary Check behavior of synzhronized key word on value instances and methods.
  * @modules  java.base/jvm.internal.value
  * @compile/fail/ref=CheckSynchronized.out -XDrawDiagnostics -Werror -Xlint:values  CheckSynchronized.java
  */
-@jvm.internal.value.DeriveValueType
+@jvm.internal.value.ValueCapableClass
 final class CheckSynchronized {
     synchronized void foo() { // <<-- ERROR, no monitor associated with `this'
     }
     void goo() {
         synchronized(this) {} // <<-- ERROR, no monitor associated with `this'