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

Comment tree not reporting correct position for label

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 23, 24, 25
    • tools
    • None
    • 23
    • generic
    • generic

      I'm filing this bug on behalf of Mickael Istria:

      When running the attached code snippet the 'positionInFile' variable gets the wrong value like this:

      $ javac --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED Issue.java
      $ java -ea --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED Issue
      Exception in thread "main" java.lang.AssertionError
      at Issue.main(Issue.java:38)

      Expected: No assertion error
      Actual: AssertionError

      Seems to have been introduced with JEP 467

        1. Issue.java
          2 kB
          Severin Gehwolf

            Unassigned Unassigned
            sgehwolf Severin Gehwolf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: