[lworld] RFR: 8329345: [lworld] type of expression in a synchronized statement can be an abstract value class

Vicente Romero vromero at openjdk.org
Fri Mar 29 21:41:05 UTC 2024


14.19 The synchronized Statement of the JLS for 401 [1] states:


SynchronizedStatement:
    synchronized ( Expression ) Block

The type of Expression must be a reference type, and must not be a final value class type, or a type variable or intersection type bounded by a final value class type, or a compile-time error occurs.

javac is not allowing value classes even if they are abstract, javac should be in sync with the latest spec

[1] https://cr.openjdk.org/~dlsmith/jep401/jep401-20240222/specs/value-objects-jls.html

-------------

Commit messages:
 - 8329345: [lworld] type of expression in a synchronized statement can be an abstract value class

Changes: https://git.openjdk.org/valhalla/pull/1068/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1068&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8329345
  Stats: 4 lines in 2 files changed: 2 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/valhalla/pull/1068.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1068/head:pull/1068

PR: https://git.openjdk.org/valhalla/pull/1068



More information about the valhalla-dev mailing list