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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: tools

      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

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: