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

javac parser needs updates to have better error recovery for error cases of new array creation with dimensions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b16

      Description

      During work on JDK-8055075 for creation of golden files for negative tests, it was suggested to have a better error message recovery for test case:

       int[] foo = new int[=] { 1, 2, 3 };

      Current error raw diagnostics:
      ExtraneousEquals.java:10:23: compiler.err.illegal.start.of.expr
      ExtraneousEquals.java:10:24: compiler.err.illegal.start.of.expr
      ExtraneousEquals.java:10:25: compiler.err.expected: ';'
      ExtraneousEquals.java:10:28: compiler.err.not.stmt
      ExtraneousEquals.java:10:29: compiler.err.expected: ';'
      5 errors

      Test: langtools/test/tools/javac/ExtraneousEquals.java
      Golden file for this test will need updates once this issue is fixed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pmuthuswamy Priya Lakshmi Muthuswamy (Inactive)
                Reporter:
                sogoel Sonali Goel
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: