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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 10
    • 9
    • tools
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: