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

Weird AST structure for incomplete member select

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 16
    • tools
    • None
    • b28

    Description

      Consider code like this:
      ---
      int i = "".
      @Deprecated void t() {}
      ---

      The AST for this will not include any sensible initializer, the initializer will be an erroneous node with no subnodes, and "@Deprecated" will be subsumed by the initializer as well. The errors are:
      ---
      /tmp/E.java:2: error: <identifier> expected
      int i = "".
                 ^
      /tmp/E.java:3: error: illegal start of expression
      @Deprecated void t() {}
      ^
      /tmp/E.java:3: error: ';' expected
      @Deprecated void t() {}
                 ^
      3 errors
      ----

      There is a relation to JDK-8253584.

      Attachments

        Issue Links

          Activity

            People

              jlahoda Jan Lahoda
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: