Weird AST structure for incomplete member select

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: None
    • Component/s: tools
    • None
    • b28

      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.

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

              Created:
              Updated:
              Resolved: