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

Investigate compiler Tree API client's expectations for inferred elided types.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd_major
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      This is a follow up ticket from https://bugs.openjdk.java.net/browse/JDK-8062373 (Coins - <>
      inference with anonymous classes) to investigate what exactly (if anything) needs to change
      with respect to how the AST should appear to a Tree API client when certain types are elided
      in the source code and are inferred during attribution.

      Specifically after <> inference (with or without anonymous classes in the picture), should the
      compiler "fill in" the diamond in the AST with tree nodes representing the inferred elided types
      or whether a client should rely on other "decorations" in the tree to discover the elided types ?

      One school of thought would be to leave the tree to be a pure AST representation of the source.
      But in general javac munges the tree in so many ways that this model is not the norm.

      I'll investigate what exactly needs to be done.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sadayapalam Srikanth Adayapalam
                Reporter:
                sadayapalam Srikanth Adayapalam
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: