Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8218763

static forwarder class should generate enum constants as final static fields

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • repo-panama
    • repo-panama
    • tools

      Current implementation doesn't have final on the generated fields, which makes them unusable in case statement,

      Here is some example of the error from compiling TensorFlow API based on earlier version of jextract.

      src/main/java/org/tensorflow/Tensor.java:954: error: constant expression required
            case TF_FLOAT:
                 ^
      src/main/java/org/tensorflow/Tensor.java:957: error: constant expression required
            case TF_DOUBLE:

            Unassigned Unassigned
            henryjen Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: