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
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