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

alpha rename type parameters in generated anon default constructor

    XMLWordPrintable

    Details

    • Subcomponent:
    • Understanding:
      Cause Known
    • Introduced In Build:
      5.0
    • Introduced In Version:
      5.0
    • CPU:
      generic
    • OS:
      solaris_8

      Description

      javac should alpha rename the generated type parameters in a generic
      generated anonymous default constructor's type. This will allow the
      following code in Enter

      372 public void visitTypeParameter(TypeParameter tree) {
      373 TypeVar a = (tree.type != null)
      374 ? (TypeVar)tree.type
      375 : new TypeVar(tree.name, env.info.scope.owner);
      376 tree.type = a;

      to be rewritten

      373 TypeVar a = new TypeVar(tree.name, env.info.scope.owner);

      And will leave the type variable symbols with correct owners.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gafter Neal Gafter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: