Comment tree not reporting correct position for label

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 23, 24, 25
    • Component/s: tools
    • None
    • 23
    • b12
    • 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

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Severin Gehwolf
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: