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

Inconsistent source code model

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20

      Backports

        Description

        Consider code like:
        ---
        class T {
             void t() {
                   for (n : ns) { }
             }
        }
        ---

        The AST node for "n" will be a VariableTree, but its modifiers and name will be null. This seems to be inconsistent with other similar cases like:
        void t(n) { }
        which is modelled as a VariableTree with non-null dummy modifiers and names.error as the name.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: